|
@@ -10,11 +10,11 @@ const PopupCreateContent = props => {
|
10
|
10
|
<div className='createcontent'>
|
11
|
11
|
<div className='createcontent__contentname mb-4'>
|
12
|
12
|
<div className='createcontent__contentname__icon ml-1 mr-3'>
|
13
|
|
- <i className={`fa ${props.icon}`} style={{color: props.color}} />
|
|
13
|
+ <i className={`fa fa-${props.faIcon}`} style={{color: props.color}} />
|
14
|
14
|
</div>
|
15
|
15
|
|
16
|
16
|
<div className='createcontent__contentname__title' style={{color: props.color}}>
|
17
|
|
- {props.title}
|
|
17
|
+ {props.label}
|
18
|
18
|
</div>
|
19
|
19
|
</div>
|
20
|
20
|
|
|
@@ -28,8 +28,8 @@ const PopupCreateContent = props => {
|
28
|
28
|
|
29
|
29
|
<div className='createcontent__form__button'>
|
30
|
30
|
<button
|
|
31
|
+ type='button' // do neither remove this nor set it to 'submit' otherwise clicking the btn will submit the form and reload the page
|
31
|
32
|
className='createcontent__form__button btn btn-primary'
|
32
|
|
- type='submit'
|
33
|
33
|
onClick={props.onValidate}
|
34
|
34
|
>
|
35
|
35
|
{props.btnValidateLabel}
|
|
@@ -46,14 +46,15 @@ PopupCreateContent.propTypes = {
|
46
|
46
|
onValidate: PropTypes.func.isRequired,
|
47
|
47
|
contentName: PropTypes.string.isRequired,
|
48
|
48
|
onChangeContentName: PropTypes.func.isRequired,
|
49
|
|
- title: PropTypes.string,
|
50
|
|
- color: PropTypes.string,
|
|
49
|
+ label: PropTypes.string,
|
|
50
|
+ hexcolor: PropTypes.string,
|
|
51
|
+ faIcon: PropTypes.string,
|
51
|
52
|
btnValidateLabel: PropTypes.string
|
52
|
53
|
}
|
53
|
54
|
|
54
|
55
|
PopupCreateContent.defaultProps = {
|
55
|
|
- title: '',
|
56
|
|
- color: '#333',
|
|
56
|
+ label: '',
|
|
57
|
+ hexcolor: '#333',
|
57
|
58
|
inputPlaceHolder: '',
|
58
|
59
|
btnValidateLabel: ''
|
59
|
60
|
}
|