feat: Add prop UIOptions.canvasActions.saveAsImage to show/hide save image button (#3662)

* feat: Add prop UIOptions.canvasActions.saveAsImage which implies whether the save as image dialog should be shown

* Add docs

* fix specs
This commit is contained in:
Aakansha Doshi 2021-05-29 19:41:50 +05:30 committed by GitHub
parent 716c78e930
commit 360310de31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 1 deletions

View file

@ -17,6 +17,8 @@ Please add the latest change on the top under the correct section.
### Features
- Added prop `UIOptions.canvasActions.saveAsImage` to show/hide the **Save as image** button in the canvas actions. Defauls to `true` hence the **Save as Image** button is rendered [#3662](https://github.com/excalidraw/excalidraw/pull/3662).
- Export dialog can be customised with [`UiOptions.canvasActions.export`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exportOpts) [#3658](https://github.com/excalidraw/excalidraw/pull/3658).
Also, [`UIOptions`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#UIOptions) is now memoized to avoid unnecessary rerenders.

View file

@ -570,6 +570,7 @@ This prop can be used to customise UI of Excalidraw. Currently we support custom
| `loadScene` | boolean | true | Implies whether to show `Load button` |
| `saveToActiveFile` | boolean | true | Implies whether to show `Save button` to save to current file |
| `theme` | boolean | true | Implies whether to show `Theme toggle` |
| `saveAsImage` | boolean | true | Implies whether to show `Save as image button` |
#### `exportOpts`