File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ CheckboxGroup.propTypes = {
6262 id : PropTypes . string . isRequired ,
6363 name : PropTypes . string . isRequired ,
6464 values : PropTypes . arrayOf ( PropTypes . string ) ,
65- label : PropTypes . node ,
65+ label : PropTypes . node . isRequired ,
6666 options : PropTypes . arrayOf ( PropTypes . shape ( {
6767 value : PropTypes . string . isRequired ,
6868 label : PropTypes . string . isRequired ,
@@ -74,7 +74,6 @@ CheckboxGroup.propTypes = {
7474CheckboxGroup . defaultProps = {
7575 children : null ,
7676 values : [ ] ,
77- label : null ,
7877 className : "" ,
7978} ;
8079
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ Factory.args = {
4141 { value : "3" , label : "Option 3" } ,
4242 { value : "4" , label : "Option 4" } ,
4343 ] ,
44+ label : "A Checkbox Group" ,
4445} ;
4546
4647export const WithLabelAndDescription = Template . bind ( ) ;
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ RadioGroup.propTypes = {
7474 id : PropTypes . string . isRequired ,
7575 name : PropTypes . string . isRequired ,
7676 value : PropTypes . string . isRequired ,
77- label : PropTypes . node ,
77+ label : PropTypes . node . isRequired ,
7878 options : PropTypes . arrayOf ( PropTypes . shape ( {
7979 value : PropTypes . string . isRequired ,
8080 label : PropTypes . string . isRequired ,
@@ -86,7 +86,6 @@ RadioGroup.propTypes = {
8686
8787RadioGroup . defaultProps = {
8888 children : null ,
89- label : null ,
9089 variant : "default" ,
9190 className : "" ,
9291} ;
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Factory.args = {
4343 { value : "3" , label : "Option 3" } ,
4444 { value : "4" , label : "Option 4" } ,
4545 ] ,
46+ label : "A Radio Group" ,
4647} ;
4748
4849export const Variants = ( args ) => (
@@ -57,14 +58,15 @@ export const Variants = ( args ) => (
5758 { value : "3" , label : "Option 3" } ,
5859 { value : "4" , label : "Option 4" } ,
5960 ] }
61+ label = "Default Radio Group"
6062 onChange = { noop }
6163 />
6264 < hr />
6365 < RadioGroup
6466 id = "radio-group-2"
6567 name = "name-2"
6668 value = "2"
67- label = "Radio group with a label "
69+ label = "Inline-block Radio Group "
6870 options = { [
6971 { value : "1" , label : "1" } ,
7072 { value : "2" , label : "2" } ,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ SelectField.propTypes = {
5454 id : PropTypes . string . isRequired ,
5555 name : PropTypes . string . isRequired ,
5656 value : PropTypes . string ,
57- label : PropTypes . node ,
57+ label : PropTypes . node . isRequired ,
5858 options : PropTypes . arrayOf ( PropTypes . shape ( {
5959 value : PropTypes . string . isRequired ,
6060 label : PropTypes . string . isRequired ,
@@ -67,7 +67,6 @@ SelectField.propTypes = {
6767SelectField . defaultProps = {
6868 children : null ,
6969 value : undefined ,
70- label : null ,
7170 error : null ,
7271 className : "" ,
7372} ;
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ Factory.args = {
4444 { value : "3" , label : "Option 3" } ,
4545 { value : "4" , label : "Option 4" } ,
4646 ] ,
47+ label : "A Select Field" ,
4748} ;
4849
4950export const WithLabelAndDescription = Template . bind ( { } ) ;
Original file line number Diff line number Diff line change @@ -54,14 +54,13 @@ const TextField = ( {
5454TextField . propTypes = {
5555 id : PropTypes . string . isRequired ,
5656 onChange : PropTypes . func . isRequired ,
57- label : PropTypes . node ,
57+ label : PropTypes . node . isRequired ,
5858 className : PropTypes . string ,
5959 description : PropTypes . node ,
6060 error : PropTypes . node ,
6161} ;
6262
6363TextField . defaultProps = {
64- label : null ,
6564 className : "" ,
6665 description : null ,
6766 error : null ,
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export default {
2020 args : {
2121 id : "input-field" ,
2222 onChange : noop ,
23+ label : "A Text Field" ,
2324 } ,
2425} ;
2526
Original file line number Diff line number Diff line change @@ -51,14 +51,13 @@ const TextareaField = ( {
5151
5252TextareaField . propTypes = {
5353 id : PropTypes . string . isRequired ,
54- label : PropTypes . node ,
54+ label : PropTypes . node . isRequired ,
5555 className : PropTypes . string ,
5656 description : PropTypes . node ,
5757 error : PropTypes . node ,
5858} ;
5959
6060TextareaField . defaultProps = {
61- label : null ,
6261 className : "" ,
6362 description : null ,
6463 error : null ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export default {
1717 } ,
1818 args : {
1919 id : "textarea-field" ,
20+ label : "A Textarea Field" ,
2021 } ,
2122} ;
2223
You can’t perform that action at this time.
0 commit comments