chore(components): improve props jsdoc

This commit is contained in:
Benjamin Canac
2024-06-28 18:36:46 +02:00
parent ec08ed9e2e
commit 84cc647f83
6 changed files with 11 additions and 6 deletions

View File

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

View File

@@ -54,7 +54,8 @@ export interface CommandPaletteProps<G, T> extends Pick<ComboboxRootProps, 'as'
placeholder?: InputProps['placeholder']
/**
* Display a close button in the input (useful when inside a `UModal`).
* @defaultValue false ({ size: 'md', color: 'gray', variant: 'ghost' })
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
* @defaultValue false
*/
close?: ButtonProps | boolean
/**

View File

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

View File

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

View File

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