mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: add props zenModeEnabled and gridModeEnabled so host can control completely (#2901)
* feat: add props zenModeEnabled and gridModeEnabled so host can control completely * dnt show exit zenmode button when prop present * fix * update when props change * Add tests * Add tests * update changelog and readme * update * Update src/tests/excalidrawPackage.test.tsx * Update src/packages/excalidraw/README.md Co-authored-by: Lipis <lipiridis@gmail.com> * Update src/packages/excalidraw/README.md Co-authored-by: David Luzar <luzar.david@gmail.com> * Apply suggestions from code review Co-authored-by: David Luzar <luzar.david@gmail.com> * fix specs Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
parent
d6ca981f7a
commit
066560311b
7 changed files with 144 additions and 5 deletions
|
@ -52,6 +52,7 @@ interface LayerUIProps {
|
|||
onLockToggle: () => void;
|
||||
onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
|
||||
zenModeEnabled: boolean;
|
||||
showExitZenModeBtn: boolean;
|
||||
toggleZenMode: () => void;
|
||||
langCode: Language["code"];
|
||||
isCollaborating: boolean;
|
||||
|
@ -296,6 +297,7 @@ const LayerUI = ({
|
|||
onLockToggle,
|
||||
onInsertElements,
|
||||
zenModeEnabled,
|
||||
showExitZenModeBtn,
|
||||
toggleZenMode,
|
||||
isCollaborating,
|
||||
onExportToBackend,
|
||||
|
@ -579,7 +581,7 @@ const LayerUI = ({
|
|||
</div>
|
||||
<button
|
||||
className={clsx("disable-zen-mode", {
|
||||
"disable-zen-mode--visible": zenModeEnabled,
|
||||
"disable-zen-mode--visible": showExitZenModeBtn,
|
||||
})}
|
||||
onClick={toggleZenMode}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue