@@ -20,10 +20,26 @@ export default {
20
20
} ;
21
21
22
22
const options = [
23
- { label : '1-on-1 interview' , value : 1 } ,
24
- { label : 'Focus group' , value : 2 } ,
25
- { label : 'Multi-day study' , value : 3 } ,
26
- { label : 'Unmoderated task' , value : 4 } ,
23
+ {
24
+ label : '1-on-1 interview' ,
25
+ value : 1 ,
26
+ description : 'Interviews are typically a conversation between you and a researcher.' ,
27
+ } ,
28
+ {
29
+ label : 'Focus group' ,
30
+ value : 2 ,
31
+ description : 'Focus groups involve interacting with a small group of your peers.' ,
32
+ } ,
33
+ {
34
+ label : 'Multi-day study' ,
35
+ value : 3 ,
36
+ description : 'Diary and multiday studies are days or weeks long commitments.' ,
37
+ } ,
38
+ {
39
+ label : 'Unmoderated task' ,
40
+ value : 4 ,
41
+ description : 'An unmoderated task is just that—an opportunity for a user to try out a product, app, website, etc and share feedback.' ,
42
+ } ,
27
43
] ;
28
44
29
45
const peopleOptions = [
@@ -168,6 +184,32 @@ export const GroupedOptions = () => {
168
184
) ;
169
185
} ;
170
186
187
+ export const CustomOptionWithDescriptionAndCheckbox = ( ) => (
188
+ < FormGroup
189
+ label = "Custom Option with Description And Checkbox"
190
+ labelHtmlFor = "custom-option-with-description-and-checkbox-select"
191
+ >
192
+ < SingleSelect
193
+ components = { {
194
+ Option : ( { ...props } ) => (
195
+ < Option
196
+ { ...props }
197
+ // eslint-disable-next-line react/prop-types
198
+ description = { props . data . description }
199
+ />
200
+ ) ,
201
+ } }
202
+ inputId = "custom-option-with-description-select"
203
+ options = { options }
204
+ onChange = { onChange }
205
+ />
206
+ </ FormGroup >
207
+ ) ;
208
+
209
+ /**
210
+ If you're adding a new code, prefer the use of `Option` with a `description` prop.
211
+ `OptionWithDescription` is effectively deprecated and will be merged into `Option`.
212
+ */
171
213
export const CustomOptionWithDescription = ( ) => {
172
214
const optionsWithDescriptions = [
173
215
{
0 commit comments