Make color picker button prioritize config colors
This commit is contained in:
1 parent
cd433b0e3c
commit
e2426ed6e5
1 file changed
+5
-2
@@ -21,10 +21,13 @@ interface ColorControlProps {
|
||||
|
||||
export function ColorSelector({ type, defaultValue }: ColorControlProps) {
|
||||
const { t } = useTranslation('settings/customization/color-selector');
|
||||
const [color, setColor] = useState(defaultValue);
|
||||
const { config, name: configName } = useConfigContext();
|
||||
const [color, setColor] =
|
||||
type === 'primary'
|
||||
? useState(config?.settings.customization.colors.primary || defaultValue)
|
||||
: useState(config?.settings.customization.colors.secondary || defaultValue);
|
||||
const [popoverOpened, popover] = useDisclosure(false);
|
||||
const { setPrimaryColor, setSecondaryColor } = useColorTheme();
|
||||
const { config, name: configName } = useConfigContext();
|
||||
const updateConfig = useConfigStore((x) => x.updateConfig);
|
||||
|
||||
const theme = useMantineTheme();
|
||||
|
||||
Reference in new issue
Block a user