@@ -9,13 +9,15 @@ import { FormSelect } from './FormSelect';
9
9
import { FormSwitch } from './FormSwitch' ;
10
10
import { FormTextarea } from './FormTextarea' ;
11
11
import { FormValidationFeedback } from './FormValidationFeedback' ;
12
+ import { FormHelp } from './FormHelp' ;
12
13
13
- export function FormGroup ( { children, name, feedback, mockInvalidSibling, ...props } ) {
14
+ export function FormGroup ( { children, name, feedback, mockInvalidSibling, help , ...props } ) {
14
15
return (
15
16
< div className = "form-group" >
16
17
< FormLabel { ...props } />
17
18
{ children }
18
19
{ feedback && < FormValidationFeedback mockInvalidSibling = { mockInvalidSibling } name = { name } /> }
20
+ { help && < FormHelp message = { help } /> }
19
21
</ div >
20
22
) ;
21
23
}
@@ -28,6 +30,7 @@ FormGroup.defaultProps = {
28
30
FormGroup . propTypes = {
29
31
children : PropTypes . oneOfType ( [ PropTypes . node , PropTypes . arrayOf ( PropTypes . node ) ] ) ,
30
32
feedback : PropTypes . bool ,
33
+ help : PropTypes . node ,
31
34
label : PropTypes . node . isRequired ,
32
35
mockInvalidSibling : PropTypes . bool ,
33
36
name : PropTypes . string . isRequired ,
@@ -44,6 +47,7 @@ export function FormGroupAutocomplete(props) {
44
47
FormGroupAutocomplete . propTypes = {
45
48
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
46
49
filter : PropTypes . func ,
50
+ help : PropTypes . node ,
47
51
id : PropTypes . string ,
48
52
label : PropTypes . node . isRequired ,
49
53
name : PropTypes . string . isRequired ,
@@ -70,6 +74,7 @@ export function FormGroupCheckbox(props) {
70
74
FormGroupCheckbox . propTypes = {
71
75
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
72
76
falseLabel : PropTypes . node ,
77
+ help : PropTypes . node ,
73
78
id : PropTypes . string . isRequired ,
74
79
label : PropTypes . node . isRequired ,
75
80
name : PropTypes . string . isRequired ,
@@ -87,6 +92,7 @@ export function FormGroupInput(props) {
87
92
88
93
FormGroupInput . propTypes = {
89
94
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
95
+ help : PropTypes . node ,
90
96
id : PropTypes . string ,
91
97
label : PropTypes . node . isRequired ,
92
98
max : PropTypes . string ,
@@ -126,6 +132,7 @@ FormGroupRadio.defaultProps = {
126
132
127
133
FormGroupRadio . propTypes = {
128
134
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
135
+ help : PropTypes . node ,
129
136
id : PropTypes . string ,
130
137
inline : PropTypes . bool ,
131
138
label : PropTypes . node . isRequired ,
@@ -149,6 +156,7 @@ export function FormGroupSelect(props) {
149
156
150
157
FormGroupSelect . propTypes = {
151
158
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
159
+ help : PropTypes . node ,
152
160
id : PropTypes . string ,
153
161
label : PropTypes . node . isRequired ,
154
162
name : PropTypes . string . isRequired ,
@@ -181,6 +189,7 @@ export function FormGroupSwitch(props) {
181
189
FormGroupSwitch . propTypes = {
182
190
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
183
191
falseLabel : PropTypes . node ,
192
+ help : PropTypes . node ,
184
193
id : PropTypes . string . isRequired ,
185
194
label : PropTypes . node . isRequired ,
186
195
name : PropTypes . string . isRequired ,
@@ -198,6 +207,7 @@ export function FormGroupTextarea(props) {
198
207
199
208
FormGroupTextarea . propTypes = {
200
209
disabled : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . func ] ) ,
210
+ help : PropTypes . node ,
201
211
id : PropTypes . string ,
202
212
label : PropTypes . node . isRequired ,
203
213
name : PropTypes . string . isRequired ,
0 commit comments