mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Introduce ExcalidrawElements and ExcalidrawAppState provider (#5463)
* feat: Introduce ExcalidrawData provider so that app state and elements need not be passed to children * fix * fix zen mode * Separate providers for data and elements * pass appState and elements to layerUI * pass appState and elements to selectedShapeActions * pass appState and elements to MobileMenu * pass appState to librarymenu * rename * rename to ExcalidrawAppState
This commit is contained in:
parent
46a61ad4df
commit
ec350ba8b2
6 changed files with 96 additions and 80 deletions
|
@ -71,8 +71,8 @@ const LayerUI = ({
|
|||
appState,
|
||||
files,
|
||||
setAppState,
|
||||
canvas,
|
||||
elements,
|
||||
canvas,
|
||||
onCollabButtonClick,
|
||||
onLockToggle,
|
||||
onPenModeToggle,
|
||||
|
@ -210,8 +210,8 @@ const LayerUI = ({
|
|||
)}
|
||||
</Stack.Row>
|
||||
<BackgroundPickerAndDarkModeToggle
|
||||
actionManager={actionManager}
|
||||
appState={appState}
|
||||
actionManager={actionManager}
|
||||
setAppState={setAppState}
|
||||
showThemeBtn={showThemeBtn}
|
||||
/>
|
||||
|
@ -244,7 +244,6 @@ const LayerUI = ({
|
|||
appState={appState}
|
||||
elements={elements}
|
||||
renderAction={actionManager.renderAction}
|
||||
activeTool={appState.activeTool.type}
|
||||
/>
|
||||
</Island>
|
||||
</Section>
|
||||
|
@ -279,7 +278,6 @@ const LayerUI = ({
|
|||
libraryReturnUrl={libraryReturnUrl}
|
||||
focusContainer={focusContainer}
|
||||
library={library}
|
||||
theme={appState.theme}
|
||||
files={files}
|
||||
id={id}
|
||||
appState={appState}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue