chore(theme): lint

This commit is contained in:
Benjamin Canac
2024-04-12 14:01:23 +02:00
parent 290e4ce150
commit 74a640ceca
11 changed files with 51 additions and 65 deletions

View File

@@ -3,42 +3,37 @@ export default (config: { colors: string[] }) => ({
root: 'relative',
base: 'relative block w-full disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none border-0 rounded-md placeholder-gray-400 dark:placeholder-gray-500'
},
variants: {
size: {
'2xs': {
base: 'text-xs gap-x-1 px-2 py-1'
},
xs: {
'xs': {
base: 'text-sm gap-x-1.5 px-2.5 py-1'
},
sm: {
'sm': {
base: 'text-sm gap-x-1.5 px-2.5 py-1.5'
},
md: {
'md': {
base: 'text-sm gap-x-1.5 px-3 py-2'
},
lg: {
'lg': {
base: 'text-sm gap-x-2.5 px-3.5 py-2.5'
},
xl: {
'xl': {
base: 'text-base gap-x-2.5 px-3.5 py-2.5'
}
},
variant: {
outline: '',
none: 'bg-transparent focus:ring-0 focus:shadow-none'
},
color: {
...Object.fromEntries(config.colors.map((color: string) => [color, ''])),
white: '',
gray: ''
}
},
compoundVariants: [
...config.colors.map((color: string) => ({
color,
@@ -54,7 +49,6 @@ export default (config: { colors: string[] }) => ({
class: 'shadow-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white ring ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400'
}
],
defaultVariants: {
size: 'sm',
color: 'white',