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

@@ -18,11 +18,16 @@ export interface AccordionItem extends Partial<Pick<AccordionItemProps, 'disable
content?: string
}
export interface AccordionProps<T> extends Omit<AccordionRootProps, 'asChild' | 'dir' | 'orientation'> {
export interface AccordionProps<T> extends Pick<AccordionRootProps, 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled'> {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any
items?: T[]
/**
* The icon displayed on the right side of the trigger.
* @defaultValue `appConfig.ui.icons.chevronDown`
* @defaultValue appConfig.ui.icons.chevronDown
*/
trailingIcon?: string
/** The content of the accordion. */