Browse Source

minor fixes

Aakansha Doshi 4 years ago
parent
commit
edc23b854f

+ 1 - 1
src/packages/excalidraw/CHANGELOG.md

@@ -18,7 +18,7 @@ Please add the latest change on the top under the correct section.
 
 ### Features
 
-- Add `name` prop which allows changing the export name. When this prop is passed, the name is fully controlled by host and will become unediable in the export modal [#3273](https://github.com/excalidraw/excalidraw/pull/3273).
+- Add `name` prop which indicates the name of the drawing which will be used when exporting the drawing. When supplied, the value takes precedence over `intialData.appState.name`, the `name` will be fully controlled by host app and the users won't be able to edit from within Excalidraw [#3273](https://github.com/excalidraw/excalidraw/pull/3273).
 - Export API to export the drawing to canvas, svg and blob [#3258](https://github.com/excalidraw/excalidraw/pull/3258). For more info you can check the [readme](https://github.com/excalidraw/excalidraw/tree/master/src/packages/excalidraw/README.md#user-content-export-utils)
 - Add a `theme` prop to indicate Excalidraw's theme. [#3228](https://github.com/excalidraw/excalidraw/pull/3228). When this prop is passed, the theme is fully controlled by host app.
 - Support `libraryReturnUrl` prop to indicate what URL to install libraries to [#3227](https://github.com/excalidraw/excalidraw/pull/3227).

+ 1 - 1
src/packages/excalidraw/README.md

@@ -546,7 +546,7 @@ This prop controls Excalidraw's theme. When supplied, the value takes precedence
 
 ### `name`
 
-This prop sets the export name of the drawing. When supplied, the value takes precedence over `intialData.appState.name`.
+This prop sets the name of the drawing which will be used when exporting the drawing. When supplied, the value takes precedence over `intialData.appState.name`, the `name` will be fully controlled by host app and the users won't be able to edit from within Excalidraw.
 
 ### Extra API's
 

+ 1 - 1
src/tests/excalidrawPackage.test.tsx

@@ -116,7 +116,7 @@ describe("<Excalidraw/>", () => {
       expect(name?.hasAttribute("data-type")).toBe(true);
     });
 
-    it('should not allow editing the export name when the name prop is not "undefined"', async () => {
+    it('should not allow editing the export name when the name prop is present"', async () => {
       const { container } = await render(<Excalidraw name="test" />);
 
       fireEvent.click(queryByTestId(container, "export-button")!);