mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
Merge e707279c37
into 01304aac49
This commit is contained in:
commit
899e94f3e2
3 changed files with 11 additions and 2 deletions
|
@ -326,7 +326,7 @@ export const actionChangeStrokeColor = register({
|
|||
<>
|
||||
<h3 aria-hidden="true">{t("labels.stroke")}</h3>
|
||||
<ColorPicker
|
||||
topPicks={DEFAULT_ELEMENT_STROKE_PICKS}
|
||||
topPicks={appProps.strokeColorTopPicks ?? DEFAULT_ELEMENT_STROKE_PICKS}
|
||||
palette={DEFAULT_ELEMENT_STROKE_COLOR_PALETTE}
|
||||
type="elementStroke"
|
||||
label={t("labels.stroke")}
|
||||
|
@ -372,7 +372,9 @@ export const actionChangeBackgroundColor = register({
|
|||
<>
|
||||
<h3 aria-hidden="true">{t("labels.background")}</h3>
|
||||
<ColorPicker
|
||||
topPicks={DEFAULT_ELEMENT_BACKGROUND_PICKS}
|
||||
topPicks={
|
||||
appProps.backgroundColorTopPicks ?? DEFAULT_ELEMENT_BACKGROUND_PICKS
|
||||
}
|
||||
palette={DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE}
|
||||
type="elementBackground"
|
||||
label={t("labels.background")}
|
||||
|
|
|
@ -53,6 +53,8 @@ const ExcalidrawBase = (props: ExcalidrawProps) => {
|
|||
renderEmbeddable,
|
||||
aiEnabled,
|
||||
showDeprecatedFonts,
|
||||
strokeColorTopPicks,
|
||||
backgroundColorTopPicks,
|
||||
} = props;
|
||||
|
||||
const canvasActions = props.UIOptions?.canvasActions;
|
||||
|
@ -143,6 +145,8 @@ const ExcalidrawBase = (props: ExcalidrawProps) => {
|
|||
renderEmbeddable={renderEmbeddable}
|
||||
aiEnabled={aiEnabled !== false}
|
||||
showDeprecatedFonts={showDeprecatedFonts}
|
||||
strokeColorTopPicks={strokeColorTopPicks}
|
||||
backgroundColorTopPicks={backgroundColorTopPicks}
|
||||
>
|
||||
{children}
|
||||
</App>
|
||||
|
|
|
@ -3,6 +3,7 @@ import type {
|
|||
UserIdleState,
|
||||
throttleRAF,
|
||||
MIME_TYPES,
|
||||
ColorTuple,
|
||||
} from "@excalidraw/common";
|
||||
|
||||
import type { SuggestedBinding } from "@excalidraw/element/binding";
|
||||
|
@ -601,6 +602,8 @@ export interface ExcalidrawProps {
|
|||
) => JSX.Element | null;
|
||||
aiEnabled?: boolean;
|
||||
showDeprecatedFonts?: boolean;
|
||||
strokeColorTopPicks?: ColorTuple;
|
||||
backgroundColorTopPicks?: ColorTuple;
|
||||
}
|
||||
|
||||
export type SceneData = {
|
||||
|
|
Loading…
Add table
Reference in a new issue