@@ -35,6 +35,7 @@ const ProjectListApplyer = ({
3535 applyedLabels,
3636 applyingStatus,
3737 onApply,
38+ labelsToAdd,
3839 labelsToRemove,
3940 alert
4041} ) => (
@@ -61,7 +62,7 @@ const ProjectListApplyer = ({
6162 < LabelList
6263 header = "Labels to Add:"
6364 className = "labels-to-add"
64- labels = { LABELS_TO_ADD }
65+ labels = { labelsToAdd }
6566 applyedLabels = { applyedLabels }
6667 />
6768 { labelsToRemove . length === 0 ? null :
@@ -76,6 +77,11 @@ const ProjectListApplyer = ({
7677 </ div >
7778 ) ;
7879
80+ const labelShape = PropTypes . shape ( {
81+ name : PropTypes . string . isRequired ,
82+ color : PropTypes . string . isRequired ,
83+ } ) ;
84+
7985ProjectListApplyer . propTypes = {
8086 className : PropTypes . string ,
8187
@@ -91,17 +97,16 @@ ProjectListApplyer.propTypes = {
9197 projects : PropTypes . arrayOf ( projectShape ) . isRequired ,
9298 selectedPreject : projectShape ,
9399
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 ,
98102}
99103
100104ProjectListApplyer . defaultProps = {
101105 className : "" ,
102106 applying : false ,
103107 applyedLabels : [ ] ,
104108 labelsToRemove : [ ] ,
109+ labelsToAdd : LABELS_TO_ADD ,
105110}
106111
107112export default ProjectListApplyer
0 commit comments