mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 19:00:35 +01:00
chore(DropdownMenu): extend disabled prop from radix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { tv } from 'tailwind-variants'
|
import { tv } from 'tailwind-variants'
|
||||||
import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuArrowProps, DropdownMenuTriggerProps } from 'radix-vue'
|
import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuArrowProps, DropdownMenuTriggerProps, DropdownMenuItemProps } from 'radix-vue'
|
||||||
import type { AppConfig } from '@nuxt/schema'
|
import type { AppConfig } from '@nuxt/schema'
|
||||||
import _appConfig from '#build/app.config'
|
import _appConfig from '#build/app.config'
|
||||||
import theme from '#build/ui/dropdown-menu'
|
import theme from '#build/ui/dropdown-menu'
|
||||||
@@ -11,7 +11,7 @@ const appConfig = _appConfig as AppConfig & { ui: { dropdownMenu: Partial<typeof
|
|||||||
|
|
||||||
const dropdownMenu = tv({ extend: tv(theme), ...(appConfig.ui?.dropdownMenu || {}) })
|
const dropdownMenu = tv({ extend: tv(theme), ...(appConfig.ui?.dropdownMenu || {}) })
|
||||||
|
|
||||||
export interface DropdownMenuItem extends Omit<LinkProps, 'type'> {
|
export interface DropdownMenuItem extends Omit<LinkProps, 'type'>, Pick<DropdownMenuItemProps, 'disabled'> {
|
||||||
label?: string
|
label?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
avatar?: AvatarProps
|
avatar?: AvatarProps
|
||||||
@@ -19,9 +19,9 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type'> {
|
|||||||
kbds?: KbdProps['value'][] | KbdProps[]
|
kbds?: KbdProps['value'][] | KbdProps[]
|
||||||
/**
|
/**
|
||||||
* The item type.
|
* The item type.
|
||||||
* @defaultValue `'link'`
|
* @defaultValue `'item'`
|
||||||
*/
|
*/
|
||||||
type?: 'label' | 'separator' | 'link'
|
type?: 'label' | 'separator' | 'item'
|
||||||
slot?: string
|
slot?: string
|
||||||
open?: boolean
|
open?: boolean
|
||||||
defaultOpen?: boolean
|
defaultOpen?: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user