({ className, ...props }: SwitchFieldProps)
| 9 | import { cx } from '@/lib/primitive' |
| 10 | |
| 11 | export function SwitchField({ className, ...props }: SwitchFieldProps) { |
| 12 | return ( |
| 13 | <SwitchFieldPrimitive |
| 14 | {...props} |
| 15 | data-slot="control" |
| 16 | className={cx('has-[[slot=description]]:**:data-[slot=control-label]:font-medium', className)} |
| 17 | style={({ defaultStyle }) => ({ |
| 18 | ...defaultStyle, |
| 19 | WebkitTapHighlightColor: 'transparent', |
| 20 | })} |
| 21 | /> |
| 22 | ) |
| 23 | } |
| 24 | |
| 25 | export function Switch({ children, className, ...props }: SwitchButtonProps) { |
| 26 | return ( |