Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 30 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import React from 'react'; |
||
2 | import PropTypes from 'prop-types'; |
||
3 | import { Col, FormGroup, Input, Label, Row } from 'reactstrap'; |
||
4 | import Datetime from 'react-datetime'; |
||
5 | |||
6 | const ExperienceInput = ({ id, label, type, ...rest }) => ( |
||
7 | <FormGroup className="form-group"> |
||
8 | <Row> |
||
9 | <Col lg={3} className="text-lg-right"> |
||
10 | <Label className="mb-0" htmlFor={id}> |
||
11 | {label} |
||
12 | </Label> |
||
13 | </Col> |
||
14 | <Col lg={7}> |
||
15 | {type === 'datetime' ? <Datetime id={id} {...rest} /> : <Input bsSize="sm" id={id} type={type} {...rest} />} |
||
16 | </Col> |
||
17 | </Row> |
||
18 | </FormGroup> |
||
19 | ); |
||
20 | |||
21 | ExperienceInput.propTypes = { |
||
22 | id: PropTypes.string.isRequired, |
||
23 | label: PropTypes.string.isRequired, |
||
24 | type: PropTypes.string |
||
25 | }; |
||
26 | |||
27 | ExperienceInput.defaultProps = { type: 'text' }; |
||
28 | |||
29 | export default ExperienceInput; |
||
30 |