@@ -35,6 +35,7 @@ const ProjectListApplyer = ({
35
35
applyedLabels,
36
36
applyingStatus,
37
37
onApply,
38
+ labelsToAdd,
38
39
labelsToRemove,
39
40
alert
40
41
} ) => (
@@ -61,7 +62,7 @@ const ProjectListApplyer = ({
61
62
< LabelList
62
63
header = "Labels to Add:"
63
64
className = "labels-to-add"
64
- labels = { LABELS_TO_ADD }
65
+ labels = { labelsToAdd }
65
66
applyedLabels = { applyedLabels }
66
67
/>
67
68
{ labelsToRemove . length === 0 ? null :
@@ -76,6 +77,11 @@ const ProjectListApplyer = ({
76
77
</ div >
77
78
) ;
78
79
80
+ const labelShape = PropTypes . shape ( {
81
+ name : PropTypes . string . isRequired ,
82
+ color : PropTypes . string . isRequired ,
83
+ } ) ;
84
+
79
85
ProjectListApplyer . propTypes = {
80
86
className : PropTypes . string ,
81
87
@@ -91,17 +97,16 @@ ProjectListApplyer.propTypes = {
91
97
projects : PropTypes . arrayOf ( projectShape ) . isRequired ,
92
98
selectedPreject : projectShape ,
93
99
94
- labelsToRemove : PropTypes . arrayOf ( PropTypes . shape ( {
95
- name : PropTypes . string . isRequired ,
96
- color : PropTypes . string . isRequired ,
97
- } ) ) . isRequired ,
100
+ labelsToAdd : PropTypes . arrayOf ( labelShape ) ,
101
+ labelsToRemove : PropTypes . arrayOf ( labelShape ) . isRequired ,
98
102
}
99
103
100
104
ProjectListApplyer . defaultProps = {
101
105
className : "" ,
102
106
applying : false ,
103
107
applyedLabels : [ ] ,
104
108
labelsToRemove : [ ] ,
109
+ labelsToAdd : LABELS_TO_ADD ,
105
110
}
106
111
107
112
export default ProjectListApplyer
0 commit comments