mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 09:20:36 +01:00
chore(components): improve jsdoc
This commit is contained in:
@@ -31,7 +31,7 @@ export interface AlertProps {
|
|||||||
actions?: ButtonProps[]
|
actions?: ButtonProps[]
|
||||||
/**
|
/**
|
||||||
* Display a close button to dismiss the alert.
|
* 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`
|
* @emits `close`
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -36,7 +36,12 @@ export interface CommandPaletteGroup<T> {
|
|||||||
highlightedIcon?: string
|
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.
|
* The icon displayed in the input.
|
||||||
* @defaultValue appConfig.ui.icons.search
|
* @defaultValue appConfig.ui.icons.search
|
||||||
@@ -54,7 +59,7 @@ export interface CommandPaletteProps<G, T> extends Pick<ComboboxRootProps, 'as'
|
|||||||
placeholder?: InputProps['placeholder']
|
placeholder?: InputProps['placeholder']
|
||||||
/**
|
/**
|
||||||
* Display a close button in the input (useful when inside a `UModal`).
|
* 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
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export interface ModalProps extends DialogRootProps {
|
|||||||
portal?: boolean
|
portal?: boolean
|
||||||
/**
|
/**
|
||||||
* Display a close button to dismiss the modal.
|
* 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
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export interface SlideoverProps extends DialogRootProps {
|
|||||||
portal?: boolean
|
portal?: boolean
|
||||||
/**
|
/**
|
||||||
* Display a close button to dismiss the slideover.
|
* 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
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
|
|||||||
actions?: ButtonProps[]
|
actions?: ButtonProps[]
|
||||||
/**
|
/**
|
||||||
* Display a close button to dismiss the toast.
|
* 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
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user