refactor: rename to compactMode

This commit is contained in:
Ryan Di
2025-07-16 17:48:56 +10:00
parent 00c6599a71
commit 89246d96a5

View File

@@ -67,7 +67,7 @@ interface ColorPickerProps {
palette?: ColorPaletteCustom | null; palette?: ColorPaletteCustom | null;
topPicks?: ColorTuple; topPicks?: ColorTuple;
updateData: (formData?: any) => void; updateData: (formData?: any) => void;
hideTopPicks?: boolean; compactMode?: boolean;
} }
const ColorPickerPopupContent = ({ const ColorPickerPopupContent = ({
@@ -225,7 +225,7 @@ export const ColorPicker = ({
topPicks, topPicks,
updateData, updateData,
appState, appState,
hideTopPicks = false, compactMode = false,
}: ColorPickerProps) => { }: ColorPickerProps) => {
return ( return (
<div> <div>
@@ -233,10 +233,10 @@ export const ColorPicker = ({
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
className={clsx("color-picker-container", { className={clsx("color-picker-container", {
"color-picker-container--no-top-picks": hideTopPicks, "color-picker-container--no-top-picks": compactMode,
})} })}
> >
{!hideTopPicks && ( {!compactMode && (
<TopPicks <TopPicks
activeColor={color} activeColor={color}
onChange={onChange} onChange={onChange}
@@ -244,7 +244,7 @@ export const ColorPicker = ({
topPicks={topPicks} topPicks={topPicks}
/> />
)} )}
{!hideTopPicks && <ButtonSeparator />} {!compactMode && <ButtonSeparator />}
<Popover.Root <Popover.Root
open={appState.openPopup === type} open={appState.openPopup === type}
onOpenChange={(open) => { onOpenChange={(open) => {