mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 06:51:46 +01:00
fix(types): improve with strict mode (#1041)
This commit is contained in:
@@ -43,8 +43,8 @@ export default {
|
||||
icon: 'i-heroicons-arrows-up-down-20-solid',
|
||||
trailing: true,
|
||||
square: true,
|
||||
color: 'gray',
|
||||
variant: 'ghost',
|
||||
color: 'gray' as const,
|
||||
variant: 'ghost' as const,
|
||||
class: '-m-1.5'
|
||||
},
|
||||
loadingState: {
|
||||
@@ -56,4 +56,4 @@ export default {
|
||||
label: 'No items.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ export default {
|
||||
openIcon: 'i-heroicons-chevron-down-20-solid',
|
||||
closeIcon: '',
|
||||
class: 'mb-1.5 w-full',
|
||||
variant: 'soft'
|
||||
variant: 'soft' as const
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
},
|
||||
avatar: {
|
||||
base: 'flex-shrink-0 self-center',
|
||||
size: 'md'
|
||||
size: 'md' as const
|
||||
},
|
||||
color: {
|
||||
white: {
|
||||
@@ -31,9 +31,9 @@ export default {
|
||||
icon: null,
|
||||
closeButton: null,
|
||||
actionButton: {
|
||||
size: 'xs',
|
||||
color: 'primary',
|
||||
variant: 'link'
|
||||
size: 'xs' as const,
|
||||
color: 'primary' as const,
|
||||
variant: 'link' as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
},
|
||||
avatar: {
|
||||
base: 'flex-shrink-0',
|
||||
size: '3xs'
|
||||
size: '3xs' as const
|
||||
},
|
||||
shortcuts: 'hidden md:inline-flex flex-shrink-0 gap-0.5 ms-auto'
|
||||
},
|
||||
@@ -49,4 +49,4 @@ export default {
|
||||
ring: 'before:ring-1 before:ring-gray-200 dark:before:ring-gray-700',
|
||||
background: 'before:bg-white dark:before:bg-gray-700'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
avatar: {
|
||||
base: 'flex-shrink-0',
|
||||
size: '3xs'
|
||||
size: '3xs' as const
|
||||
},
|
||||
chip: {
|
||||
base: 'flex-shrink-0 w-2 h-2 mx-1 rounded-full'
|
||||
@@ -59,4 +59,4 @@ export default {
|
||||
ring: 'before:ring-1 before:ring-gray-200 dark:before:ring-gray-700',
|
||||
background: 'before:bg-white dark:before:bg-gray-700'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
},
|
||||
avatar: {
|
||||
base: 'flex-shrink-0',
|
||||
size: '2xs'
|
||||
size: '2xs' as const
|
||||
},
|
||||
label: 'text-sm'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,4 +64,4 @@ export default {
|
||||
closeButton: null,
|
||||
selectedIcon: 'i-heroicons-check-20-solid'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,30 +5,30 @@ export default {
|
||||
default: {
|
||||
size: 'sm',
|
||||
activeButton: {
|
||||
color: 'primary'
|
||||
color: 'primary' as const
|
||||
},
|
||||
inactiveButton: {
|
||||
color: 'white'
|
||||
color: 'white' as const
|
||||
},
|
||||
firstButton: {
|
||||
color: 'white',
|
||||
color: 'white' as const,
|
||||
class: 'rtl:[&_span:first-child]:rotate-180',
|
||||
icon: 'i-heroicons-chevron-double-left-20-solid'
|
||||
},
|
||||
lastButton: {
|
||||
color: 'white',
|
||||
color: 'white' as const,
|
||||
class: 'rtl:[&_span:last-child]:rotate-180',
|
||||
icon: 'i-heroicons-chevron-double-right-20-solid'
|
||||
},
|
||||
prevButton: {
|
||||
color: 'white',
|
||||
color: 'white' as const,
|
||||
class: 'rtl:[&_span:first-child]:rotate-180',
|
||||
icon: 'i-heroicons-chevron-left-20-solid'
|
||||
},
|
||||
nextButton: {
|
||||
color: 'white',
|
||||
color: 'white' as const,
|
||||
class: 'rtl:[&_span:last-child]:rotate-180',
|
||||
icon: 'i-heroicons-chevron-right-20-solid'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ export default {
|
||||
},
|
||||
avatar: {
|
||||
base: 'flex-shrink-0',
|
||||
size: '3xs'
|
||||
size: '3xs' as const
|
||||
},
|
||||
badge: {
|
||||
base: 'relative ms-auto inline-block py-0.5 px-2 text-xs rounded-md -me-1 -my-0.5',
|
||||
active: 'bg-white dark:bg-gray-900',
|
||||
inactive: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white group-hover:bg-white dark:group-hover:bg-gray-900'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@ export default {
|
||||
timeout: 5000,
|
||||
closeButton: {
|
||||
icon: 'i-heroicons-x-mark-20-solid',
|
||||
color: 'gray',
|
||||
variant: 'link',
|
||||
color: 'gray' as const,
|
||||
variant: 'link' as const,
|
||||
padded: false
|
||||
},
|
||||
actionButton: {
|
||||
size: 'xs',
|
||||
color: 'white'
|
||||
size: 'xs' as const,
|
||||
color: 'white' as const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user