You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mvfront-react/components/Switch.tsx

16 lines
325 B

const Switch = ({ toggle, state, className = '' }) => {
return (
<div className={`${className} form-check form-switch`}>
<input
onChange={toggle}
className="form-check-input"
type="checkbox"
role="switch"
checked={state}
/>
</div>
);
};
export default Switch;