mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
scope css under name space excalidraw (#1983)
This commit is contained in:
parent
403576861c
commit
a61b212220
33 changed files with 1706 additions and 1559 deletions
|
@ -47,7 +47,17 @@ export const Modal = (props: {
|
|||
|
||||
const useBodyRoot = () => {
|
||||
const createDiv = () => {
|
||||
const isDarkTheme = !!document
|
||||
.querySelector(".excalidraw")
|
||||
?.classList.contains("Appearance_dark");
|
||||
const div = document.createElement("div");
|
||||
|
||||
div.classList.add("excalidraw");
|
||||
|
||||
if (isDarkTheme) {
|
||||
div.classList.add("Appearance_dark");
|
||||
div.classList.add("Appearance_dark-background-none");
|
||||
}
|
||||
document.body.appendChild(div);
|
||||
return div;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue