minor fixes
This commit is contained in:
parent
4843c49556
commit
edc23b854f
@ -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).
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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")!);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user