/** @jsx jsx */ import { jsx } from '@emotion/core'; import { makeStyles } from './utils'; const Switch = ({ styles: customStyles, on, off, value, onChange, name, disabled, ...props }) => { const checked = value === on; const styles = makeStyles(customStyles); function handleClick() { if (onChange) { onChange(checked ? off : on); } } return ( ); }; Switch.defaultProps = { value: 1, on: 1, off: 0, disabled: false, styles: {} }; export default Switch;