|
@@ -1,19 +1,24 @@
|
1
|
1
|
import React from 'react'
|
2
|
2
|
import PropTypes from 'prop-types'
|
|
3
|
+import Radium from 'radium'
|
3
|
4
|
import CardPopup from './CardPopup.jsx'
|
4
|
5
|
|
5
|
6
|
require('./CardPopupCreateContent.styl')
|
6
|
7
|
|
7
|
8
|
const PopupCreateContent = props => {
|
8
|
9
|
return (
|
9
|
|
- <CardPopup customClass='popupCreateContent' onClose={props.onClose}>
|
|
10
|
+ <CardPopup
|
|
11
|
+ customClass='popupCreateContent'
|
|
12
|
+ customColor={props.customColor}
|
|
13
|
+ onClose={props.onClose}
|
|
14
|
+ >
|
10
|
15
|
<div className='createcontent'>
|
11
|
16
|
<div className='createcontent__contentname mb-4'>
|
12
|
17
|
<div className='createcontent__contentname__icon ml-1 mr-3'>
|
13
|
|
- <i className={`fa fa-${props.faIcon}`} style={{color: props.color}} />
|
|
18
|
+ <i className={`fa fa-${props.faIcon}`} style={{color: props.customColor}} />
|
14
|
19
|
</div>
|
15
|
20
|
|
16
|
|
- <div className='createcontent__contentname__title' style={{color: props.color}}>
|
|
21
|
+ <div className='createcontent__contentname__title' style={{color: props.customColor}}>
|
17
|
22
|
{props.label}
|
18
|
23
|
</div>
|
19
|
24
|
</div>
|
|
@@ -31,6 +36,15 @@ const PopupCreateContent = props => {
|
31
|
36
|
type='button' // do neither remove this nor set it to 'submit' otherwise clicking the btn will submit the form and reload the page
|
32
|
37
|
className='createcontent__form__button btn btn-primary'
|
33
|
38
|
onClick={props.onValidate}
|
|
39
|
+ style={{
|
|
40
|
+ backgroundColor: '#fdfdfd',
|
|
41
|
+ color: props.customColor,
|
|
42
|
+ borderColor: props.customColor,
|
|
43
|
+ ':hover': {
|
|
44
|
+ backgroundColor: props.customColor,
|
|
45
|
+ color: '#fdfdfd'
|
|
46
|
+ }
|
|
47
|
+ }}
|
34
|
48
|
>
|
35
|
49
|
{props.btnValidateLabel}
|
36
|
50
|
</button>
|
|
@@ -47,16 +61,16 @@ PopupCreateContent.propTypes = {
|
47
|
61
|
contentName: PropTypes.string.isRequired,
|
48
|
62
|
onChangeContentName: PropTypes.func.isRequired,
|
49
|
63
|
label: PropTypes.string,
|
50
|
|
- hexcolor: PropTypes.string,
|
|
64
|
+ customColor: PropTypes.string,
|
51
|
65
|
faIcon: PropTypes.string,
|
52
|
66
|
btnValidateLabel: PropTypes.string
|
53
|
67
|
}
|
54
|
68
|
|
55
|
69
|
PopupCreateContent.defaultProps = {
|
56
|
70
|
label: '',
|
57
|
|
- hexcolor: '#333',
|
|
71
|
+ customColor: '#333',
|
58
|
72
|
inputPlaceHolder: '',
|
59
|
73
|
btnValidateLabel: ''
|
60
|
74
|
}
|
61
|
75
|
|
62
|
|
-export default PopupCreateContent
|
|
76
|
+export default Radium(PopupCreateContent)
|