feat: add date range download dialog
This commit is contained in:
parent
74d592d892
commit
57c0b7cca1
14 changed files with 696 additions and 62 deletions
32
new-lamassu-admin/src/components/inputs/base/RadioGroup.js
Normal file
32
new-lamassu-admin/src/components/inputs/base/RadioGroup.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import React from 'react'
|
||||
import classnames from 'classnames'
|
||||
import { withStyles } from '@material-ui/styles'
|
||||
import FormControlLabel from '@material-ui/core/FormControlLabel'
|
||||
import { Radio as MaterialRadio, RadioGroup as MaterialRadioGroup } from '@material-ui/core'
|
||||
import { secondaryColor } from '../../../styling/variables'
|
||||
|
||||
const GreenRadio = withStyles({
|
||||
root: {
|
||||
color: secondaryColor,
|
||||
'&$checked': {
|
||||
color: secondaryColor
|
||||
}
|
||||
},
|
||||
checked: {}
|
||||
})(props => <MaterialRadio color='default' {...props} />)
|
||||
|
||||
const RadioGroup = ({ name, value, labels, ariaLabel, onChange, className, ...props }) => {
|
||||
return (
|
||||
<>
|
||||
{labels && (
|
||||
<MaterialRadioGroup aria-label={ariaLabel} name={name} value={value} onChange={onChange} className={classnames(className)}>
|
||||
{labels.map((label, idx) => (
|
||||
<FormControlLabel key={idx} value={idx} control={<GreenRadio />} label={label} />
|
||||
))}
|
||||
</MaterialRadioGroup>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default RadioGroup
|
||||
Loading…
Add table
Add a link
Reference in a new issue