1
1
import { disableDefaultModes } from "@spectrum-css/preview/modes" ;
2
2
import { isInvalid , isReadOnly , isRequired } from "@spectrum-css/preview/types" ;
3
3
import { default as RadioSettings } from "@spectrum-css/radio/stories/radio.stories.js" ;
4
- import { Template as Radio } from "@spectrum-css/radio/stories/template.js" ;
5
4
import metadata from "../metadata/metadata.json" ;
6
5
import packageJson from "../package.json" ;
7
6
import { FieldGroupSet } from "./fieldgroup.test.js" ;
@@ -21,6 +20,11 @@ export default {
21
20
title : "Field group" ,
22
21
component : "FieldGroup" ,
23
22
argTypes : {
23
+ label : {
24
+ name : "Label" ,
25
+ description : "The label for the field group component." ,
26
+ type : { name : "string" } ,
27
+ } ,
24
28
inputType : {
25
29
name : "Input type" ,
26
30
type : { name : "string" } ,
@@ -63,26 +67,24 @@ export default {
63
67
inputType : "radio" ,
64
68
labelPosition : "top" ,
65
69
layout : "vertical" ,
66
- label : "Select one of the following options:" ,
70
+ label : "Field group label" ,
71
+ helpText : "Select an option." ,
67
72
items : [
68
- ( passthroughs , context ) => Radio ( {
69
- ...passthroughs ,
73
+ {
70
74
id : "apple" ,
71
75
label : "Apples are best" ,
72
76
customClasses : [ "spectrum-FieldGroup-item" ] ,
73
- } , context ) ,
74
- ( passthroughs , context ) => Radio ( {
75
- ...passthroughs ,
77
+ } ,
78
+ {
76
79
id : "banana" ,
77
80
label : "Bananas forever" ,
78
81
customClasses : [ "spectrum-FieldGroup-item" ] ,
79
- } , context ) ,
80
- ( passthroughs , context ) => Radio ( {
81
- ...passthroughs ,
82
+ } ,
83
+ {
82
84
id : "pear" ,
83
85
label : "Pears or bust" ,
84
86
customClasses : [ "spectrum-FieldGroup-item" ] ,
85
- } , context ) ,
87
+ }
86
88
] ,
87
89
isInvalid : false ,
88
90
isRequired : false ,
0 commit comments