chore: allow as in content and arrow props

This commit is contained in:
Benjamin Canac
2024-04-03 17:52:08 +02:00
parent 56da54b440
commit ea29cc238c
6 changed files with 10 additions and 10 deletions

View File

@@ -15,7 +15,7 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type'> {
icon?: IconProps['name']
avatar?: AvatarProps
disabled?: boolean
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
content?: Omit<DropdownMenuContentProps, 'asChild' | 'forceMount'>
shortcuts?: string[] | KbdProps[]
type?: 'label' | 'item'
slot?: string
@@ -28,8 +28,8 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type'> {
export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'> {
items?: T[] | T[][]
disabled?: boolean
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
arrow?: boolean | Omit<DropdownMenuArrowProps, 'as' | 'asChild'>
content?: Omit<DropdownMenuContentProps, 'asChild' | 'forceMount'>
arrow?: boolean | Omit<DropdownMenuArrowProps, 'asChild'>
portal?: boolean
class?: any
ui?: Partial<typeof dropdownMenu.slots>

View File

@@ -2,7 +2,7 @@
import type { DropdownMenuContentProps as RadixDropdownMenuContentProps, DropdownMenuContentEmits as RadixDropdownMenuContentEmits } from 'radix-vue'
import type { DropdownMenuItem } from '#ui/types'
export interface DropdownMenuContentProps<T> extends Omit<RadixDropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
export interface DropdownMenuContentProps<T> extends Omit<RadixDropdownMenuContentProps, 'asChild' | 'forceMount'> {
items?: T[] | T[][]
portal?: boolean
sub?: boolean

View File

@@ -13,7 +13,7 @@ const modal = tv({ extend: tv(theme), ...(appConfig.ui?.modal || {}) })
export interface ModalProps extends DialogRootProps {
title?: string
description?: string
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
content?: Omit<DialogContentProps, 'asChild' | 'forceMount'>
overlay?: boolean
transition?: boolean
fullscreen?: boolean

View File

@@ -15,8 +15,8 @@ export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps,
* @defaultValue "click"
*/
mode?: 'click' | 'hover'
content?: Omit<PopoverContentProps, 'as' | 'asChild' | 'forceMount'>
arrow?: boolean | Omit<PopoverArrowProps, 'as' | 'asChild'>
content?: Omit<PopoverContentProps, 'asChild' | 'forceMount'>
arrow?: boolean | Omit<PopoverArrowProps, 'asChild'>
portal?: boolean
class?: any
ui?: Partial<typeof popover.slots>

View File

@@ -13,7 +13,7 @@ const slideover = tv({ extend: tv(theme), ...(appConfig.ui?.slideover || {}) })
export interface SlideoverProps extends DialogRootProps {
title?: string
description?: string
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
content?: Omit<DialogContentProps, 'asChild' | 'forceMount'>
overlay?: boolean
transition?: boolean
side?: 'left' | 'right' | 'top' | 'bottom'

View File

@@ -13,8 +13,8 @@ const tooltip = tv({ extend: tv(theme), ...(appConfig.ui?.tooltip || {}) })
export interface TooltipProps extends TooltipRootProps {
text?: string
shortcuts?: string[] | KbdProps[]
content?: Omit<TooltipContentProps, 'as' | 'asChild'>
arrow?: boolean | Omit<TooltipArrowProps, 'as' | 'asChild'>
content?: Omit<TooltipContentProps, 'asChild'>
arrow?: boolean | Omit<TooltipArrowProps, 'asChild'>
portal?: boolean
class?: any
ui?: Partial<typeof tooltip.slots>