mirror of https://github.com/prometheus/prometheus
Browse Source
* migrate query history Signed-off-by: blalov <boyko.lalov@tick42.com> * update lock file Signed-off-by: blalov <boyko.lalov@tick42.com> * set expression input height when item is selected Signed-off-by: blalov <boyko.lalov@tick42.com> * pr review changes Signed-off-by: blalov <boyko.lalov@tick42.com>pull/6207/head
Boyko
5 years ago
committed by
Julius Volz
10 changed files with 113 additions and 47 deletions
@ -0,0 +1,22 @@
|
||||
import React, { FC, HTMLProps, memo } from 'react'; |
||||
import { FormGroup, Label, Input } from 'reactstrap'; |
||||
import { uuidGen } from './utils/func'; |
||||
|
||||
const Checkbox: FC<HTMLProps<HTMLSpanElement>> = ({ children, onChange, style }) => { |
||||
const id = uuidGen(); |
||||
return ( |
||||
<FormGroup className="custom-control custom-checkbox" style={style}> |
||||
<Input |
||||
onChange={onChange} |
||||
type="checkbox" |
||||
className="custom-control-input" |
||||
id={`checkbox_${id}`} |
||||
placeholder="password placeholder" /> |
||||
<Label style={{ userSelect: 'none' }} className="custom-control-label" for={`checkbox_${id}`}> |
||||
{children} |
||||
</Label> |
||||
</FormGroup> |
||||
) |
||||
} |
||||
|
||||
export default memo(Checkbox); |
Loading…
Reference in new issue