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:
Aakansha Doshi 2021-04-13 23:02:57 +05:30 committed by GitHub
parent e0a449aa40
commit 793b69e592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 90 additions and 61 deletions

View file

@ -640,6 +640,7 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
setErrorMessage={(errorMessage) => {
this.setState({ errorMessage });
}}
theme={this.excalidrawAPI.getAppState().theme}
/>
)}
{errorMessage && (

View file

@ -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>