import React from 'react';
import * as BaseSwitch from '@radix-ui/react-switch';

import * as css from './switch-element.css';

export interface SwitchElementProps extends css.SwitchElementVariants {
  children: React.ReactNode;
}

export const SwitchElement = ({ type, children }: SwitchElementProps) => (
  <BaseSwitch.Thumb className={css.switchElement({ type })}>
    {children}
  </BaseSwitch.Thumb>
);
