github.com/thanos-io/thanos@v0.32.5/pkg/ui/react-app/src/components/Checkbox.tsx (about) 1 import React, { FC, memo, CSSProperties } from 'react'; 2 import { FormGroup, Label, Input, InputProps } from 'reactstrap'; 3 4 interface CheckboxProps extends InputProps { 5 wrapperStyles?: CSSProperties; 6 } 7 8 const Checkbox: FC<CheckboxProps> = ({ children, wrapperStyles, id, ...rest }) => { 9 return ( 10 <FormGroup className="custom-control custom-checkbox" style={wrapperStyles}> 11 <Input {...rest} id={id} type="checkbox" className="custom-control-input" /> 12 <Label style={{ userSelect: 'none' }} className="custom-control-label" for={id}> 13 {children} 14 </Label> 15 </FormGroup> 16 ); 17 }; 18 19 export default memo(Checkbox);