mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 00:43:54 +00:00
18 lines
507 B
TypeScript
18 lines
507 B
TypeScript
import { Switch as BaseSwitch } from '@base-ui-components/react/switch';
|
|
|
|
import { cx } from '../../utils/styleUtils';
|
|
|
|
import style from './Switch.module.scss';
|
|
|
|
interface SwitchProps extends BaseSwitch.Root.Props {
|
|
size?: 'medium' | 'large';
|
|
}
|
|
|
|
export default function Switch({ size = 'medium', ...switchProps }: SwitchProps) {
|
|
return (
|
|
<BaseSwitch.Root className={cx([style.switch, style[size]])} {...switchProps}>
|
|
<BaseSwitch.Thumb className={style.thumb} />
|
|
</BaseSwitch.Root>
|
|
);
|
|
}
|