'use client' import { forwardRef } from 'react' import * as SwitchPrimitive from '@radix-ui/react-switch' import classNames from 'classnames' import { BaseButton } from '~/src/components/BaseButton' import { useFormFieldProps } from '~/src/components/FormControl' import { type SwitchProps } from './Switch.types' import styles from './Switch.module.scss' /** * @deprecated */ const SWITCH_TEST_ID = 'bezier-switch' /** * `Switch` is an input component where user can toggle checked state of the element. * @example * ```tsx * * ``` */ export const Switch = forwardRef( function Switch( { checked, defaultChecked = false, onCheckedChange, size = 'm', className, ...rest }, forwardedRef ) { const { disabled, required, hasError, ...ownProps } = useFormFieldProps(rest) return ( ) } )