| Total Complexity | 0 |
| Complexity/F | 0 |
| Lines of Code | 26 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Coverage | 75% |
| Changes | 0 | ||
| 1 | import React from 'react' |
||
| 2 | import PropTypes from 'prop-types' |
||
| 3 | import TextField from 'post/components/base/TextField' |
||
| 4 | |||
| 5 | 2 | const Title = ({ isEdited, title, editPostTitle }) => ( |
|
| 6 | 1 | <TextField |
|
| 7 | label="Post title" |
||
| 8 | required |
||
| 9 | variant="outlined" |
||
| 10 | value={title} |
||
| 11 | multiline |
||
| 12 | rowsMax={2} |
||
| 13 | fullWidth |
||
| 14 | error={isEdited} |
||
| 15 | onChange={event => editPostTitle(event.target.value)} |
||
| 16 | /> |
||
| 17 | ) |
||
| 18 | |||
| 19 | export default Title |
||
| 20 | |||
| 21 | 2 | Title.propTypes = { |
|
| 22 | isEdited: PropTypes.bool, |
||
| 23 | title: PropTypes.string, |
||
| 24 | editPostTitle: PropTypes.func |
||
| 25 | } |
||
| 26 |