mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Apply theme to only to active excalidraw component (#3446)
* feat: Apply theme to only current instance of excalidraw * fix * fix * fix * fix * fix * update changelog * fix
This commit is contained in:
parent
e0a449aa40
commit
793b69e592
6 changed files with 90 additions and 61 deletions
|
@ -640,6 +640,7 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
|
|||
setErrorMessage={(errorMessage) => {
|
||||
this.setState({ errorMessage });
|
||||
}}
|
||||
theme={this.excalidrawAPI.getAppState().theme}
|
||||
/>
|
||||
)}
|
||||
{errorMessage && (
|
||||
|
|
|
@ -13,6 +13,7 @@ import { ToolButton } from "../../components/ToolButton";
|
|||
import { t } from "../../i18n";
|
||||
import "./RoomDialog.scss";
|
||||
import Stack from "../../components/Stack";
|
||||
import { AppState } from "../../types";
|
||||
|
||||
const getShareIcon = () => {
|
||||
const navigator = window.navigator as any;
|
||||
|
@ -36,6 +37,7 @@ const RoomDialog = ({
|
|||
onRoomCreate,
|
||||
onRoomDestroy,
|
||||
setErrorMessage,
|
||||
theme,
|
||||
}: {
|
||||
handleClose: () => void;
|
||||
activeRoomLink: string;
|
||||
|
@ -44,6 +46,7 @@ const RoomDialog = ({
|
|||
onRoomCreate: () => void;
|
||||
onRoomDestroy: () => void;
|
||||
setErrorMessage: (message: string) => void;
|
||||
theme: AppState["theme"];
|
||||
}) => {
|
||||
const roomLinkInput = useRef<HTMLInputElement>(null);
|
||||
|
||||
|
@ -168,6 +171,7 @@ const RoomDialog = ({
|
|||
small
|
||||
onCloseRequest={handleClose}
|
||||
title={t("labels.liveCollaboration")}
|
||||
theme={theme}
|
||||
>
|
||||
{renderRoomDialog()}
|
||||
</Dialog>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue