all files / src/explore/components/controls/ HiddenControl.jsx

90.91% Statements 10/11
100% Branches 0/0
0% Functions 0/2
90% Lines 9/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24                              
import React from 'react';
import PropTypes from 'prop-types';
import { FormControl } from 'react-bootstrap';
 
const propTypes = {
  onChange: PropTypes.func,
  value: PropTypes.oneOfType([
    PropTypes.string,
    PropTypes.number,
  ]),
};
 
const defaultProps = {
  onChange: () => {},
};
 
export default function HiddenControl(props) {
  // This wouldn't be necessary but might as well
  return <FormControl type="hidden" value={props.value} />;
}
 
HiddenControl.propTypes = propTypes;
HiddenControl.defaultProps = defaultProps;