feat: Export THEME from the package (#4055)
* Use Theme type everywhere * Rename Appearance type to Theme for consistency * Reorder headers in readme The host don't need to pass hardcoded strings any more and instead can use the exported constant
This commit is contained in:
@ -10,6 +10,7 @@ import {
|
||||
Arrowhead,
|
||||
ChartType,
|
||||
FontFamilyValues,
|
||||
Theme,
|
||||
} from "./element/types";
|
||||
import { SHAPES } from "./shapes";
|
||||
import { Point as RoughPoint } from "roughjs/bin/geometry";
|
||||
@ -98,7 +99,7 @@ export type AppState = {
|
||||
showHelpDialog: boolean;
|
||||
toastMessage: string | null;
|
||||
zenModeEnabled: boolean;
|
||||
theme: "light" | "dark";
|
||||
theme: Theme;
|
||||
gridSize: number | null;
|
||||
viewModeEnabled: boolean;
|
||||
|
||||
@ -192,7 +193,7 @@ export interface ExcalidrawProps {
|
||||
zenModeEnabled?: boolean;
|
||||
gridModeEnabled?: boolean;
|
||||
libraryReturnUrl?: string;
|
||||
theme?: "dark" | "light";
|
||||
theme?: Theme;
|
||||
name?: string;
|
||||
renderCustomStats?: (
|
||||
elements: readonly NonDeletedExcalidrawElement[],
|
||||
|
Reference in New Issue
Block a user