Passed
Push — master ( 6fca9e...82ba0d )
by Huu-Phat
02:25 queued 10s
created

cms/src/post/components/Title.js

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 26
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 0
eloc 22
mnd 0
bc 0
fnc 0
dl 0
loc 26
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
ccs 3
cts 4
cp 0.75
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