Lamassu admin server initial commit
This commit is contained in:
parent
d083ae5a40
commit
fc1951c4b2
158 changed files with 28462 additions and 1606 deletions
42
new-lamassu-admin/src/components/inputs/base/Checkbox.js
Normal file
42
new-lamassu-admin/src/components/inputs/base/Checkbox.js
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import React, { memo } from 'react'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import Checkbox from '@material-ui/core/Checkbox'
|
||||
import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'
|
||||
import CheckBoxIcon from '@material-ui/icons/CheckBox'
|
||||
|
||||
import { secondaryColor } from '../../../styling/variables'
|
||||
|
||||
const useStyles = makeStyles({
|
||||
root: {
|
||||
color: secondaryColor,
|
||||
'&$checked': {
|
||||
color: secondaryColor
|
||||
}
|
||||
},
|
||||
checked: {}
|
||||
})
|
||||
|
||||
const CheckboxInput = ({ name, onChange, value, label, ...props }) => {
|
||||
const classes = useStyles()
|
||||
|
||||
// const { name, onChange, value } = props.field
|
||||
|
||||
return (
|
||||
<Checkbox
|
||||
id={name}
|
||||
classes={{
|
||||
root: classes.root,
|
||||
checked: classes.checked
|
||||
}}
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
checked={value}
|
||||
icon={<CheckBoxOutlineBlankIcon style={{ marginLeft: 2, fontSize: 16 }} />}
|
||||
checkedIcon={<CheckBoxIcon style={{ fontSize: 20 }} />}
|
||||
disableRipple
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default CheckboxInput
|
||||
Loading…
Add table
Add a link
Reference in a new issue