mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
* save work * fix perf issue on i18n rollup * fix reset styling * move body line-height from reset Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
26 lines
637 B
TypeScript
26 lines
637 B
TypeScript
import React from 'react';
|
|
import Checkbox from '@mui/material/Checkbox';
|
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
|
|
const CheckboxField = (props) => {
|
|
const { input: { value, onChange }, label, ...args } = props;
|
|
|
|
// @TODO this isnt unchecking properly
|
|
return (
|
|
<FormControlLabel
|
|
className="checkbox-field"
|
|
label={label}
|
|
control={
|
|
<Checkbox
|
|
{ ...args }
|
|
className="checkbox-field__box"
|
|
checked={!!value}
|
|
onChange={(e, checked) => onChange(checked)}
|
|
color="primary"
|
|
/>
|
|
}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default CheckboxField;
|