chore(components): improve props

This commit is contained in:
Benjamin Canac
2024-06-28 18:13:03 +02:00
parent c9f9a248b7
commit 673064dee5
38 changed files with 260 additions and 137 deletions

View File

@@ -21,19 +21,24 @@ export interface TabsItem extends Partial<Pick<TabsTriggerProps, 'disabled' | 'v
type TabsVariants = VariantProps<typeof tabs>
export interface TabsProps<T> extends Omit<TabsRootProps, 'asChild' | 'orientation'> {
export interface TabsProps<T> extends Pick<TabsRootProps, 'defaultValue' | 'modelValue' | 'activationMode'> {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any
items?: T[]
color?: TabsVariants['color']
variant?: TabsVariants['variant']
size?: TabsVariants['size']
/**
* The orientation of the tabs.
* @defaultValue `'horizontal'`
* @defaultValue 'horizontal'
*/
orientation?: TabsRootProps['orientation']
/**
* The content of the tabs, can be disabled to prevent rendering the content.
* @defaultValue `true`
* @defaultValue true
*/
content?: boolean | Omit<TabsContentProps, 'as' | 'asChild' | 'value'>
class?: any