Skip to content

Commit d762bc8

Browse files
author
lixl
committed
feat(core): support theme lock
1 parent d2ec573 commit d762bc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react/src/components/Editor/ColorsSection/ColorEditDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function ColorEditDrawer({ open, colorType, onClose }: ColorEditDrawerPro
9595
}, [colorType, themeObject]);
9696

9797
const handleMainColorChange = (newColor: string) => {
98-
if (!colorType) return;
98+
if (!colorType || isThemeLocked) return;
9999

100100
const augmentedColor = themeObject.palette.augmentColor({ color: { main: newColor } } as any);
101101

packages/react/src/components/Editor/ColorsSection/HexColorField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function HexColorField({
8989
readOnly,
9090
endAdornment: (
9191
<>
92-
{value !== defaultValue && (
92+
{!readOnly && value !== defaultValue && (
9393
<IconButton title={t('editor.reset')} onClick={() => onReset?.(path)}>
9494
<RestartAltIcon sx={{ fontSize: 20 }} />
9595
</IconButton>

0 commit comments

Comments
 (0)