mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-31 04:07:56 +01:00
chore(components): improve props jsdoc
This commit is contained in:
@@ -31,8 +31,9 @@ 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' }`.
|
||||||
* @emits `close`
|
* @emits `close`
|
||||||
* @defaultValue false ({ size: 'md', color: 'gray', variant: 'link' })
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ 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`).
|
||||||
* @defaultValue false ({ size: 'md', color: 'gray', variant: 'ghost' })
|
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
|
||||||
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ 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.
|
||||||
* @defaultValue true ({ size: 'md', color: 'gray', variant: 'ghost' })
|
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
|
||||||
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ 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.
|
||||||
* @defaultValue true ({ size: 'md', color: 'gray', variant: 'ghost' })
|
* Will render with `{ size: 'md', color: 'gray', variant: 'ghost' }`.
|
||||||
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ 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.
|
||||||
* @defaultValue true ({ size: 'md', color: 'gray', variant: 'link' })
|
* Will render with `{ size: 'md', color: 'gray', variant: 'link' }`.
|
||||||
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: ButtonProps | boolean
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { computed, toValue, type MaybeRefOrGetter } from 'vue'
|
|||||||
import { useAppConfig } from '#imports'
|
import { useAppConfig } from '#imports'
|
||||||
|
|
||||||
export interface UseComponentIconsProps {
|
export interface UseComponentIconsProps {
|
||||||
/** Display an icon based on the `leading` and `trailing` props.value. */
|
/** Display an icon based on the `leading` and `trailing` props. */
|
||||||
icon?: string
|
icon?: string
|
||||||
/** When `true`, the icon will be displayed on the left side. */
|
/** When `true`, the icon will be displayed on the left side. */
|
||||||
leading?: boolean
|
leading?: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user