minor fixes

This commit is contained in:
Aakansha Doshi 2021-03-20 13:41:12 +05:30 committed by GitHub
parent 4843c49556
commit edc23b854f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ Please add the latest change on the top under the correct section.
### Features ### 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) - 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. - 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). - Support `libraryReturnUrl` prop to indicate what URL to install libraries to [#3227](https://github.com/excalidraw/excalidraw/pull/3227).

View File

@ -546,7 +546,7 @@ This prop controls Excalidraw's theme. When supplied, the value takes precedence
### `name` ### `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 ### Extra API's

View File

@ -116,7 +116,7 @@ describe("<Excalidraw/>", () => {
expect(name?.hasAttribute("data-type")).toBe(true); 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" />); const { container } = await render(<Excalidraw name="test" />);
fireEvent.click(queryByTestId(container, "export-button")!); fireEvent.click(queryByTestId(container, "export-button")!);