10 lines
322 B
TypeScript
10 lines
322 B
TypeScript
const EnforceSwitch = ({ enforce, onChange }: { enforce: boolean, onChange: React.ChangeEventHandler<HTMLInputElement> }) => {
|
|
return (
|
|
<label className="switch switch-sm justify-center">
|
|
<input type="checkbox" checked={enforce} value="1" onChange={onChange} />
|
|
</label>
|
|
);
|
|
};
|
|
|
|
export { EnforceSwitch };
|