All files / javascripts/explorev2/components/controls HiddenControl.jsx

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