fix: Spread with default styles in theme control panel

This commit is contained in:
Sahaj Jain
2025-04-12 23:42:49 +05:30
parent 1b01b5c800
commit 8a10e77225
@@ -21,6 +21,7 @@ import {
DEFAULT_FONT_SANS,
DEFAULT_FONT_SERIF,
COMMON_STYLES,
defaultThemeState,
} from "../../config/theme";
import { Separator } from "../ui/separator";
import { AlertCircle } from "lucide-react";
@@ -45,7 +46,10 @@ const ThemeControlPanel = ({
} = useEditorStore();
const [cssImportOpen, setCssImportOpen] = useState(false);
const currentStyles = styles?.[currentMode];
const currentStyles = {
...defaultThemeState.styles[currentMode],
...styles?.[currentMode],
};
const updateStyle = React.useCallback(
<K extends keyof typeof currentStyles>(