@@ -53,6 +53,7 @@ export const Standard: Story = {
5353 idPrefix = { args . idPrefix }
5454 name = "nationality"
5555 id = "nationality"
56+ { ...args }
5657 >
5758 < Checkboxes . Item value = "british" > British</ Checkboxes . Item >
5859 < Checkboxes . Item value = "irish" > Irish</ Checkboxes . Item >
@@ -68,6 +69,7 @@ export const WithHintText: Story = {
6869 < Checkboxes
6970 legend = "How do you want to sign in?"
7071 legendProps = { { isPageHeading : true , size : 'l' } }
72+ { ...args }
7173 >
7274 < Checkboxes . Item
7375 id = "government-gateway"
@@ -94,7 +96,7 @@ export const WithHintText: Story = {
9496export const WithDisabledItem : Story = {
9597 render : ( args ) => (
9698 < form >
97- < Checkboxes id = "colours" name = "colours" >
99+ < Checkboxes id = "colours" name = "colours" { ... args } >
98100 < Checkboxes . Item value = "red" > Red</ Checkboxes . Item >
99101 < Checkboxes . Item value = "green" > Green</ Checkboxes . Item >
100102 < Checkboxes . Item value = "red" disabled >
@@ -114,6 +116,7 @@ export const WithConditionalContent: Story = {
114116 hint = "Select all that apply"
115117 id = "waste"
116118 name = "waste"
119+ { ...args }
117120 >
118121 < Checkboxes . Item conditional = { < p > This includes rocks and earth.</ p > } value = "mines" >
119122 Waste from mines or quarries
@@ -132,6 +135,7 @@ export const WithExclusiveNoneOption: Story = {
132135 hint = "Select all the symptoms you have"
133136 id = "symptoms"
134137 name = "symptoms"
138+ { ...args }
135139 >
136140 < Checkboxes . Item value = "sore-throat" > Sore throat</ Checkboxes . Item >
137141 < Checkboxes . Item value = "runny-nose" > Runny nose</ Checkboxes . Item >
@@ -158,6 +162,7 @@ export const WithError: Story = {
158162 error = { error }
159163 id = "waste"
160164 name = "waste"
165+ { ...args }
161166 >
162167 < Checkboxes . Item value = "animal" > Waste from animal carcasses</ Checkboxes . Item >
163168 < Checkboxes . Item value = "mines" > Waste from mines or quarries</ Checkboxes . Item >
@@ -175,7 +180,7 @@ export const WithError: Story = {
175180} ;
176181
177182export const NoIDSupplied : Story = {
178- render : function NoIDSuppliedRender ( ) {
183+ render : function NoIDSuppliedRender ( args ) {
179184 const checkbox1Ref = useRef < HTMLInputElement > ( null ) ;
180185 const checkbox2Ref = useRef < HTMLInputElement > ( null ) ;
181186 const checkbox3Ref = useRef < HTMLInputElement > ( null ) ;
@@ -248,7 +253,7 @@ export const NoIDSupplied: Story = {
248253 </ li >
249254 </ ul >
250255 < h5 > Component</ h5 >
251- < Checkboxes >
256+ < Checkboxes { ... args } >
252257 < Checkboxes . Item ref = { checkbox1Ref } > Box 1</ Checkboxes . Item >
253258 < Checkboxes . Item ref = { checkbox2Ref } > Box 2</ Checkboxes . Item >
254259 < Checkboxes . Item ref = { checkbox3Ref } > Box 3</ Checkboxes . Item >
@@ -259,7 +264,7 @@ export const NoIDSupplied: Story = {
259264} ;
260265
261266export const NameSupplied : Story = {
262- render : function NameSuppliedRender ( ) {
267+ render : function NameSuppliedRender ( args ) {
263268 const checkbox1Ref = useRef < HTMLInputElement > ( null ) ;
264269 const checkbox2Ref = useRef < HTMLInputElement > ( null ) ;
265270 const checkbox3Ref = useRef < HTMLInputElement > ( null ) ;
@@ -332,7 +337,7 @@ export const NameSupplied: Story = {
332337 </ li >
333338 </ ul >
334339 < h5 > Component</ h5 >
335- < Checkboxes name = "name-supplied" >
340+ < Checkboxes name = "name-supplied" { ... args } >
336341 < Checkboxes . Item ref = { checkbox1Ref } > Box 1</ Checkboxes . Item >
337342 < Checkboxes . Item ref = { checkbox2Ref } > Box 2</ Checkboxes . Item >
338343 < Checkboxes . Item ref = { checkbox3Ref } > Box 3</ Checkboxes . Item >
@@ -343,7 +348,7 @@ export const NameSupplied: Story = {
343348} ;
344349
345350export const IDPrefixSupplied : Story = {
346- render : function IDPrefixSuppliedRender ( ) {
351+ render : function IDPrefixSuppliedRender ( args ) {
347352 const checkbox1Ref = useRef < HTMLInputElement > ( null ) ;
348353 const checkbox2Ref = useRef < HTMLInputElement > ( null ) ;
349354 const checkbox3Ref = useRef < HTMLInputElement > ( null ) ;
@@ -417,7 +422,7 @@ export const IDPrefixSupplied: Story = {
417422 </ li >
418423 </ ul >
419424 < h5 > Component</ h5 >
420- < Checkboxes idPrefix = "idprefix" >
425+ < Checkboxes idPrefix = "idprefix" { ... args } >
421426 < Checkboxes . Item ref = { checkbox1Ref } > Box 1</ Checkboxes . Item >
422427 < Checkboxes . Item ref = { checkbox2Ref } > Box 2</ Checkboxes . Item >
423428 < Checkboxes . Item ref = { checkbox3Ref } > Box 3</ Checkboxes . Item >
@@ -428,7 +433,7 @@ export const IDPrefixSupplied: Story = {
428433} ;
429434
430435export const IDPrefixAndNameSupplied : Story = {
431- render : function IDPrefixAndNameSuppliedRender ( ) {
436+ render : function IDPrefixAndNameSuppliedRender ( args ) {
432437 const checkbox1Ref = useRef < HTMLInputElement > ( null ) ;
433438 const checkbox2Ref = useRef < HTMLInputElement > ( null ) ;
434439 const checkbox3Ref = useRef < HTMLInputElement > ( null ) ;
@@ -502,7 +507,7 @@ export const IDPrefixAndNameSupplied: Story = {
502507 </ li >
503508 </ ul >
504509 < h5 > Component</ h5 >
505- < Checkboxes idPrefix = "idprefix" name = "testname" >
510+ < Checkboxes idPrefix = "idprefix" name = "testname" { ... args } >
506511 < Checkboxes . Item ref = { checkbox1Ref } > Box 1</ Checkboxes . Item >
507512 < Checkboxes . Item ref = { checkbox2Ref } > Box 2</ Checkboxes . Item >
508513 < Checkboxes . Item ref = { checkbox3Ref } > Box 3</ Checkboxes . Item >
@@ -513,7 +518,7 @@ export const IDPrefixAndNameSupplied: Story = {
513518} ;
514519
515520export const OnChangeAndOnInputHandlers : Story = {
516- render : function OnChangeAndOnInputHandlersRender ( ) {
521+ render : function OnChangeAndOnInputHandlersRender ( args ) {
517522 const [ changeEventLog , setChangeEventLog ] = useState < Array < string > > ( [ ] ) ;
518523 const [ inputEventLog , setInputEventLog ] = useState < Array < string > > ( [ ] ) ;
519524 const [ currentValue , setCurrentValue ] = useState < Array < string > > ( [ ] ) ;
@@ -548,7 +553,7 @@ export const OnChangeAndOnInputHandlers: Story = {
548553 < li > The value is passed through</ li >
549554 </ ul >
550555 < h5 > Component</ h5 >
551- < Checkboxes onChange = { handleChange } onInput = { handleInput } >
556+ < Checkboxes onChange = { handleChange } onInput = { handleInput } { ... args } >
552557 < Checkboxes . Item value = "1" > Box 1</ Checkboxes . Item >
553558 < Checkboxes . Item value = "2" > Box 2</ Checkboxes . Item >
554559 < Checkboxes . Item value = "3" > Box 3</ Checkboxes . Item >
0 commit comments