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

cms/src/post/components/Slug.js

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 23
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 0
eloc 19
mnd 0
bc 0
fnc 0
dl 0
loc 23
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 Slug = ({ isEdited, slug, editPostSlug }) => (
6 1
  <TextField
7
    label="Slug"
8
    variant="outlined"
9
    value={slug}
10
    fullWidth
11
    error={isEdited}
12
    onChange={event => editPostSlug(event.target.value)}
13
  />
14
)
15
16
export default Slug
17
18 2
Slug.propTypes = {
19
  isEdited: PropTypes.bool,
20
  slug: PropTypes.string,
21
  editPostSlug: PropTypes.func
22
}
23