chore(components): improve jsdoc

This commit is contained in:
Benjamin Canac
2024-07-01 16:22:08 +02:00
parent ccbaf6ea15
commit d2be8fdf7d
5 changed files with 11 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ export interface AlertProps {
actions?: ButtonProps[]
/**
* Display a close button to dismiss the alert.
* Will render with `{ size: 'md', color: 'gray', variant: 'link' }`.
* `{ size: 'md', color: 'gray', variant: 'link' }`
* @emits `close`
* @defaultValue false
*/

View File

@@ -36,7 +36,12 @@ export interface CommandPaletteGroup<T> {
highlightedIcon?: string
}
export interface CommandPaletteProps<G, T> extends Pick<ComboboxRootProps, 'as' | 'multiple' | 'disabled' | 'modelValue' | 'defaultValue'>, Pick<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
export interface CommandPaletteProps<G, T> extends Pick<ComboboxRootProps, 'multiple' | 'disabled' | 'modelValue' | 'defaultValue'>, Pick<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any
/**
* The icon displayed in the input.
* @defaultValue appConfig.ui.icons.search
@@ -54,7 +59,7 @@ export interface CommandPaletteProps<G, T> extends Pick<ComboboxRootProps, 'as'
placeholder?: InputProps['placeholder']
/**
* Display a close button in the input (useful when inside a `UModal`).
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
* `{ size: 'md', color: 'gray', variant: 'ghost' }`
* @defaultValue false
*/
close?: ButtonProps | boolean

View File

@@ -25,7 +25,7 @@ export interface ModalProps extends DialogRootProps {
portal?: boolean
/**
* Display a close button to dismiss the modal.
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
* `{ size: 'md', color: 'gray', variant: 'ghost' }`
* @defaultValue true
*/
close?: ButtonProps | boolean

View File

@@ -35,7 +35,7 @@ export interface SlideoverProps extends DialogRootProps {
portal?: boolean
/**
* Display a close button to dismiss the slideover.
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
* `{ size: 'md', color: 'gray', variant: 'ghost' }`
* @defaultValue true
*/
close?: ButtonProps | boolean

View File

@@ -31,7 +31,7 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
actions?: ButtonProps[]
/**
* Display a close button to dismiss the toast.
* Will render with `{ size: 'md', color: 'gray', variant: 'link' }`.
* `{ size: 'md', color: 'gray', variant: 'link' }`
* @defaultValue true
*/
close?: ButtonProps | boolean