mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(DropdownMenu/ContextMenu): handle color field in items (#2510)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -12,9 +12,12 @@ const appConfig = _appConfig as AppConfig & { ui: { dropdownMenu: Partial<typeof
|
||||
|
||||
const dropdownMenu = tv({ extend: tv(theme), ...(appConfig.ui?.dropdownMenu || {}) })
|
||||
|
||||
type DropdownMenuVariants = VariantProps<typeof dropdownMenu>
|
||||
|
||||
export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
|
||||
label?: string
|
||||
icon?: string
|
||||
color?: DropdownMenuVariants['color']
|
||||
avatar?: AvatarProps
|
||||
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
|
||||
kbds?: KbdProps['value'][] | KbdProps[]
|
||||
@@ -34,8 +37,6 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cust
|
||||
onUpdateChecked?(checked: boolean): void
|
||||
}
|
||||
|
||||
type DropdownMenuVariants = VariantProps<typeof dropdownMenu>
|
||||
|
||||
export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'> {
|
||||
size?: DropdownMenuVariants['size']
|
||||
items?: T[] | T[][]
|
||||
|
||||
Reference in New Issue
Block a user