🎨 Changed primary/secondary color to camelCase
This commit is contained in:
@@ -44,7 +44,7 @@ export default function TitleChanger() {
|
||||
{...form.getInputProps('favicon')}
|
||||
/>
|
||||
<TextInput label="Background" placeholder="" {...form.getInputProps('background')} />
|
||||
<Button type="submit" color={config.settings.primary_color || 'red'}>
|
||||
<Button type="submit" color={config.settings.primaryColor || 'red'}>
|
||||
Save
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -17,8 +17,8 @@ export function ColorSelector({ type }: ColorControlProps) {
|
||||
|
||||
const configColor =
|
||||
type === 'primary'
|
||||
? config.settings.primary_color || 'red'
|
||||
: config.settings.secondary_color || 'orange';
|
||||
? config.settings.primaryColor || 'red'
|
||||
: config.settings.secondaryColor || 'orange';
|
||||
|
||||
const setConfigColor = (color: string) => {
|
||||
if (type === 'primary') {
|
||||
@@ -26,7 +26,7 @@ export function ColorSelector({ type }: ColorControlProps) {
|
||||
...config,
|
||||
settings: {
|
||||
...config.settings,
|
||||
primary_color: color,
|
||||
primaryColor: color,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
@@ -34,7 +34,7 @@ export function ColorSelector({ type }: ColorControlProps) {
|
||||
...config,
|
||||
settings: {
|
||||
...config.settings,
|
||||
secondary_color: color,
|
||||
secondaryColor: color,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ export default function CommonSettings(args: any) {
|
||||
const theme = useMantineTheme();
|
||||
const colors = Object.keys(theme.colors).map((color) => theme.colors[color][6]);
|
||||
|
||||
const [primaryColor, setPrimaryColor] = useState(config.settings.primary_color);
|
||||
const [secondaryColor, setSecondaryColor] = useState(config.settings.secondary_color);
|
||||
const [primaryColor, setPrimaryColor] = useState(config.settings.primaryColor);
|
||||
const [secondaryColor, setSecondaryColor] = useState(config.settings.secondaryColor);
|
||||
|
||||
// const convertColorHexToNames = (hex: string) => {
|
||||
// // Have to add some exceptions here because it's not converting cleanly
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function ModuleEnabler(props: any) {
|
||||
size="md"
|
||||
checked={config.modules?.[module.title]?.enabled ?? false}
|
||||
label={`Enable ${module.title}`}
|
||||
color={config.settings.primary_color || 'red'}
|
||||
color={config.settings.primaryColor || 'red'}
|
||||
onChange={(e) => {
|
||||
setConfig({
|
||||
...config,
|
||||
|
||||
Reference in New Issue
Block a user