feat: customise export dialog with UIOptions.canvasActions.export prop (#3658)
* refactor: update UIOptions.canvasActions.export to be a an object * fix * fix * dnt show export icon when false * fix * inline * memoize UIOptions * update docs * fix * tweak readme Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
@ -178,9 +178,11 @@ describe("<Excalidraw/>", () => {
|
||||
expect(queryByTestId(container, "load-button")).toBeNull();
|
||||
});
|
||||
|
||||
it("should hide save as button when saveAsScene is false", async () => {
|
||||
it("should hide save as button when saveFileToDisk is false", async () => {
|
||||
const { container } = await render(
|
||||
<Excalidraw UIOptions={{ canvasActions: { saveAsScene: false } }} />,
|
||||
<Excalidraw
|
||||
UIOptions={{ canvasActions: { export: { saveFileToDisk: false } } }}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(queryByTestId(container, "save-as-button")).toBeNull();
|
||||
|
Reference in New Issue
Block a user