feat: Add theme prop (#3228)
* support appearance when updating scene data * works! * whoops, missed a prop * hide appearance button when prop is not set * cleanup * fix export + rename prop to theme * rename to showThemeBtn, hide via react instead of css * adapt to new state name * add tests and css selector to target the dark mode toggle * updated changelog and readme * fix markdown rendering in readme * pr feedback
This commit is contained in:
@ -53,6 +53,7 @@ interface LayerUIProps {
|
||||
onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
|
||||
zenModeEnabled: boolean;
|
||||
showExitZenModeBtn: boolean;
|
||||
showThemeBtn: boolean;
|
||||
toggleZenMode: () => void;
|
||||
langCode: Language["code"];
|
||||
isCollaborating: boolean;
|
||||
@ -325,6 +326,7 @@ const LayerUI = ({
|
||||
onInsertElements,
|
||||
zenModeEnabled,
|
||||
showExitZenModeBtn,
|
||||
showThemeBtn,
|
||||
toggleZenMode,
|
||||
isCollaborating,
|
||||
onExportToBackend,
|
||||
@ -441,6 +443,7 @@ const LayerUI = ({
|
||||
actionManager={actionManager}
|
||||
appState={appState}
|
||||
setAppState={setAppState}
|
||||
showThemeBtn={showThemeBtn}
|
||||
/>
|
||||
</Stack.Col>
|
||||
</Island>
|
||||
@ -671,6 +674,7 @@ const LayerUI = ({
|
||||
isCollaborating={isCollaborating}
|
||||
renderCustomFooter={renderCustomFooter}
|
||||
viewModeEnabled={viewModeEnabled}
|
||||
showThemeBtn={showThemeBtn}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
|
Reference in New Issue
Block a user