mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 02:40:35 +01:00
chore: use new syntax for css variables (#3258)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -58,35 +58,35 @@ export default (options: Required<ModuleOptions>) => ({
|
||||
compoundVariants: [...(options.theme.colors || []).map((color: string) => ({
|
||||
color,
|
||||
variant: 'solid',
|
||||
class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
|
||||
class: `bg-(--ui-${color}) text-(--ui-bg)`
|
||||
})), ...(options.theme.colors || []).map((color: string) => ({
|
||||
color,
|
||||
variant: 'outline',
|
||||
class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/50`
|
||||
class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/50`
|
||||
})), ...(options.theme.colors || []).map((color: string) => ({
|
||||
color,
|
||||
variant: 'soft',
|
||||
class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
|
||||
class: `bg-(--ui-${color})/10 text-(--ui-${color})`
|
||||
})), ...(options.theme.colors || []).map((color: string) => ({
|
||||
color,
|
||||
variant: 'subtle',
|
||||
class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
|
||||
class: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
|
||||
})), {
|
||||
color: 'neutral',
|
||||
variant: 'solid',
|
||||
class: 'text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]'
|
||||
class: 'text-(--ui-bg) bg-(--ui-bg-inverted)'
|
||||
}, {
|
||||
color: 'neutral',
|
||||
variant: 'outline',
|
||||
class: 'ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)]'
|
||||
class: 'ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg)'
|
||||
}, {
|
||||
color: 'neutral',
|
||||
variant: 'soft',
|
||||
class: 'text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]'
|
||||
class: 'text-(--ui-text) bg-(--ui-bg-elevated)'
|
||||
}, {
|
||||
color: 'neutral',
|
||||
variant: 'subtle',
|
||||
class: 'ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]'
|
||||
class: 'ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated)'
|
||||
}],
|
||||
defaultVariants: {
|
||||
color: 'primary',
|
||||
|
||||
Reference in New Issue
Block a user