Added color swatches

This commit is contained in:
Sean Edmunds
2026-02-04 16:15:01 -06:00
parent 8daeffcb39
commit abad473e4c
5 changed files with 17 additions and 7 deletions

View File

@@ -106,7 +106,7 @@ export default function BackgroundPicker({
))} ))}
</Stack> </Stack>
</ScrollArea.Autosize> </ScrollArea.Autosize>
<Group justify='center'> <Group mih={'36px'} pb={'.5rem'}>
<Button <Button
color={'green'} color={'green'}
onClick={() => { onClick={() => {

View File

@@ -140,7 +140,7 @@ export default function ThemeChanges({
</Group> </Group>
)} )}
{key.includes('Font') && ( {key.includes('Font') && (
<> <Group w={'95%'} justify='space-between'>
<Text <Text
style={{ style={{
fontFamily: fontFamily:
@@ -161,7 +161,7 @@ export default function ThemeChanges({
{designerTheme[key as keyof Theme] || {designerTheme[key as keyof Theme] ||
`Default (${currentUser.defaultFont})`} `Default (${currentUser.defaultFont})`}
</Text> </Text>
</> </Group>
)} )}
{key === 'backgroundImage' && ( {key === 'backgroundImage' && (
<> <>

View File

@@ -37,8 +37,17 @@ export default function ThemeColorPicker({
closePicker: () => void; closePicker: () => void;
}) { }) {
const { theme, textShadowStyle } = useCommonHooks(); const { theme, textShadowStyle } = useCommonHooks();
const swatches = [
'#ffffff',
'#000000',
defaultTheme.primaryColor,
defaultTheme.accentColor,
defaultTheme.backgroundColor,
defaultTheme.searchColor,
defaultTheme.borderColor,
];
return ( return (
<Stack h={'100%'} align='center'> <Stack h={'100%'} align='center' gap={0}>
<Text <Text
className={textClasses.sectionTitle} className={textClasses.sectionTitle}
classNames={textClasses} classNames={textClasses}
@@ -61,6 +70,7 @@ export default function ThemeColorPicker({
}} }}
format={'hexa'} format={'hexa'}
w={'90%'} w={'90%'}
swatches={swatches}
/> />
)} )}
{colorId !== 'searchColor' && ( {colorId !== 'searchColor' && (
@@ -76,6 +86,7 @@ export default function ThemeColorPicker({
format={'hex'} format={'hex'}
w={'90%'} w={'90%'}
mb={'1.5rem'} mb={'1.5rem'}
swatches={swatches}
/> />
)} )}
<Stack w={'90%'} gap={0}> <Stack w={'90%'} gap={0}>
@@ -182,7 +193,7 @@ export default function ThemeColorPicker({
/> />
</Group> </Group>
</Stack> </Stack>
<Group mt={'auto'} justify='center' mih={'36px'} pb={'1.5rem'}> <Group mt={'auto'} justify='center' mih={'36px'} pb={'1rem'}>
<Tooltip <Tooltip
label={'Random Color'} label={'Random Color'}
className={toolTipClasses.default} className={toolTipClasses.default}

View File

@@ -205,7 +205,7 @@ export default function ThemeOptions({
setDesignerTheme={setDesignerTheme} setDesignerTheme={setDesignerTheme}
/> />
)} )}
<Group mih={'36px'} pb={'1.5rem'}> <Group mih={'36px'} pb={'1rem'}>
<Tooltip <Tooltip
label={'Randomize Colors!'} label={'Randomize Colors!'}
c={'var(--mantine-color-primary-0)'} c={'var(--mantine-color-primary-0)'}

View File

@@ -88,7 +88,6 @@
.wrapper { .wrapper {
display: flex; display: flex;
margin-top: -16px; margin-top: -16px;
padding-top: 8px;
border-radius: 4px; border-radius: 4px;
.input { .input {
border: none; border: none;