mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 02:10:40 +01:00
chore(Switch): improve props JSDoc
This commit is contained in:
@@ -14,9 +14,16 @@ type SwitchVariants = VariantProps<typeof switchTv>
|
|||||||
export interface SwitchProps extends Omit<SwitchRootProps, 'asChild' | 'checked' | 'defaultChecked'> {
|
export interface SwitchProps extends Omit<SwitchRootProps, 'asChild' | 'checked' | 'defaultChecked'> {
|
||||||
color?: SwitchVariants['color']
|
color?: SwitchVariants['color']
|
||||||
size?: SwitchVariants['size']
|
size?: SwitchVariants['size']
|
||||||
|
/** When `true`, the loading icon will be displayed. */
|
||||||
loading?: boolean
|
loading?: boolean
|
||||||
|
/**
|
||||||
|
* The icon when the `loading` prop is `true`.
|
||||||
|
* @defaultValue `appConfig.ui.icons.loading`
|
||||||
|
*/
|
||||||
loadingIcon?: string
|
loadingIcon?: string
|
||||||
|
/** Display an icon when the switch is checked. */
|
||||||
checkedIcon?: string
|
checkedIcon?: string
|
||||||
|
/** Display an icon when the switch is unchecked. */
|
||||||
uncheckedIcon?: string
|
uncheckedIcon?: string
|
||||||
label?: string
|
label?: string
|
||||||
description?: string
|
description?: string
|
||||||
|
|||||||
Reference in New Issue
Block a user