Skip to content

Commit 5d72e6f

Browse files
committed
fix(UserMenu): handle old-neutral
1 parent c6779a5 commit 5d72e6f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎app/components/UserMenu.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ const items = computed<DropdownMenuItem[][]>(() => ([[{
5959
}, {
6060
label: 'Neutral',
6161
slot: 'chip',
62-
chip: appConfig.ui.colors.neutral,
62+
chip: appConfig.ui.colors.neutral === 'neutral' ? 'old-neutral' : appConfig.ui.colors.neutral,
6363
content: {
6464
align: 'end',
6565
collisionPadding: 16
6666
},
6767
children: neutrals.map(color => ({
6868
label: color,
69-
chip: color,
69+
chip: color === 'neutral' ? 'old-neutral' : color,
7070
slot: 'chip',
7171
type: 'checkbox',
7272
checked: appConfig.ui.colors.neutral === color,
@@ -173,8 +173,11 @@ const items = computed<DropdownMenuItem[][]>(() => ([[{
173173

174174
<template #chip-leading="{ item }">
175175
<span
176-
:style="{ '--chip': `var(--color-${(item as any).chip}-400)` }"
177-
class="ms-0.5 size-2 rounded-full bg-(--chip)"
176+
:style="{
177+
'--chip-light': `var(--color-${(item as any).chip}-500)`,
178+
'--chip-dark': `var(--color-${(item as any).chip}-400)`
179+
}"
180+
class="ms-0.5 size-2 rounded-full bg-(--chip-light) dark:bg-(--chip-dark)"
178181
/>
179182
</template>
180183
</UDropdownMenu>

0 commit comments

Comments
 (0)