chore(Switch): improve props JSDoc

This commit is contained in:
Benjamin Canac
2024-06-10 11:17:42 +02:00
parent d8189052be
commit 0f2da5bb15

View File

@@ -14,9 +14,16 @@ type SwitchVariants = VariantProps<typeof switchTv>
export interface SwitchProps extends Omit<SwitchRootProps, 'asChild' | 'checked' | 'defaultChecked'> {
color?: SwitchVariants['color']
size?: SwitchVariants['size']
/** When `true`, the loading icon will be displayed. */
loading?: boolean
/**
* The icon when the `loading` prop is `true`.
* @defaultValue `appConfig.ui.icons.loading`
*/
loadingIcon?: string
/** Display an icon when the switch is checked. */
checkedIcon?: string
/** Display an icon when the switch is unchecked. */
uncheckedIcon?: string
label?: string
description?: string