MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / CheckboxInput

Function CheckboxInput

packages/ui/src/ui-component/checkbox/Checkbox.jsx:5–27  ·  view source on GitHub ↗
({ value, label, onChange, disabled = false })

Source from the content-addressed store, hash-verified

3import { FormControlLabel, Checkbox } from '@mui/material'
4
5export const CheckboxInput = ({ value, label, onChange, disabled = false }) => {
6 const [myValue, setMyValue] = useState(value)
7
8 return (
9 <>
10 <FormControlLabel
11 sx={{ mt: 1, width: '100%' }}
12 size='small'
13 control={
14 <Checkbox
15 disabled={disabled}
16 checked={myValue}
17 onChange={(event) => {
18 setMyValue(event.target.checked)
19 onChange(event.target.checked)
20 }}
21 />
22 }
23 label={label}
24 />
25 </>
26 )
27}
28
29CheckboxInput.propTypes = {
30 value: PropTypes.bool,

Callers

nothing calls this directly

Calls 1

onChangeFunction · 0.50

Tested by

no test coverage detected