mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
chore(components): improve props
This commit is contained in:
@@ -31,10 +31,15 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'custom'>, Pick<Navi
|
||||
|
||||
type NavigationMenuVariants = VariantProps<typeof navigationMenu>
|
||||
|
||||
export interface NavigationMenuProps<T> extends Omit<NavigationMenuRootProps, 'asChild' | 'dir' | 'orientation'> {
|
||||
export interface NavigationMenuProps<T> extends Pick<NavigationMenuRootProps, 'defaultValue' | 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'modelValue' | 'skipDelayDuration'> {
|
||||
/**
|
||||
* The element or component this component should render as.
|
||||
* @defaultValue `div`
|
||||
*/
|
||||
as?: any
|
||||
/**
|
||||
* The icon displayed to open the menu.
|
||||
* @defaultValue `appConfig.ui.icons.chevronDown`
|
||||
* @defaultValue appConfig.ui.icons.chevronDown
|
||||
*/
|
||||
trailingIcon?: string
|
||||
items?: T[] | T[][]
|
||||
@@ -42,7 +47,7 @@ export interface NavigationMenuProps<T> extends Omit<NavigationMenuRootProps, 'a
|
||||
variant?: NavigationMenuVariants['variant']
|
||||
/**
|
||||
* The orientation of the menu.
|
||||
* @defaultValue `'horizontal'`
|
||||
* @defaultValue 'horizontal'
|
||||
*/
|
||||
orientation?: NavigationMenuRootProps['orientation']
|
||||
/** Display a line next to the active item. */
|
||||
@@ -52,7 +57,7 @@ export interface NavigationMenuProps<T> extends Omit<NavigationMenuRootProps, 'a
|
||||
content?: Omit<NavigationMenuContentProps, 'as' | 'asChild' | 'forceMount'>
|
||||
/**
|
||||
* Display an arrow alongside the menu.
|
||||
* @defaultValue `false`
|
||||
* @defaultValue false
|
||||
*/
|
||||
arrow?: boolean
|
||||
class?: any
|
||||
|
||||
Reference in New Issue
Block a user