@@ -15,9 +15,12 @@ let configured = false;
1515const meta : Meta < typeof CharacterCount > = {
1616 title : "GOVUK Design System/Character count" ,
1717 component : CharacterCount ,
18- decorators : [ ( Story , { parameters } ) => {
18+ decorators : [
19+ ( Story , { parameters } ) => {
1920 React . useEffect ( ( ) => {
20- const isDocsMode = window . location . search . includes ( "path=/docs/govuk-design-system-character-count--docs" ) ;
21+ const isDocsMode = window . location . search . includes (
22+ "path=/docs/govuk-design-system-character-count--docs" ,
23+ ) ;
2124 if ( isDocsMode && ! configured && parameters . initializeConfigurations ) {
2225 ConfigureOverallCharacterCount ( ) ;
2326 configured = true ;
@@ -26,7 +29,8 @@ const meta: Meta<typeof CharacterCount> = {
2629 }
2730 } , [ ] ) ;
2831 return < Story /> ;
29- } ] ,
32+ } ,
33+ ] ,
3034 tags : [ "autodocs" ] ,
3135} ;
3236
@@ -35,7 +39,8 @@ type Story = StoryObj<typeof CharacterCount>;
3539
3640// extractShownFixtures transforms raw govuk-frontend fixture data into
3741// React-compatible props (e.g. text → children, classes → className).
38- const examplesFromFixtures : Array < ComponentFixture > = extractShownFixtures ( fixtures ) ;
42+ const examplesFromFixtures : Array < ComponentFixture > =
43+ extractShownFixtures ( fixtures ) ;
3944
4045export const Default : Story = {
4146 name : "default" ,
@@ -44,40 +49,61 @@ export const Default: Story = {
4449
4550export const WithHint : Story = {
4651 name : "with hint" ,
47- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with hint" ) ?. options } ,
52+ args : {
53+ ...examplesFromFixtures . find ( ( f ) => f . name === "with hint" ) ?. options ,
54+ } ,
4855} ;
4956
5057export const WithHintAndError : Story = {
5158 name : "with hint and error" ,
52- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with hint and error" ) ?. options } ,
59+ args : {
60+ ...examplesFromFixtures . find ( ( f ) => f . name === "with hint and error" )
61+ ?. options ,
62+ } ,
5363} ;
5464
5565export const WithDefaultValue : Story = {
5666 name : "with default value" ,
57- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with default value" ) ?. options } ,
67+ args : {
68+ ...examplesFromFixtures . find ( ( f ) => f . name === "with default value" )
69+ ?. options ,
70+ } ,
5871} ;
5972
6073export const WithDefaultValueExceedingLimit : Story = {
6174 name : "with default value exceeding limit" ,
62- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with default value exceeding limit" ) ?. options } ,
75+ args : {
76+ ...examplesFromFixtures . find (
77+ ( f ) => f . name === "with default value exceeding limit" ,
78+ ) ?. options ,
79+ } ,
6380} ;
6481
6582export const WithCustomRows : Story = {
6683 name : "with custom rows" ,
67- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with custom rows" ) ?. options } ,
84+ args : {
85+ ...examplesFromFixtures . find ( ( f ) => f . name === "with custom rows" ) ?. options ,
86+ } ,
6887} ;
6988
7089export const WithLabelAsPageHeading : Story = {
7190 name : "with label as page heading" ,
72- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with label as page heading" ) ?. options } ,
91+ args : {
92+ ...examplesFromFixtures . find ( ( f ) => f . name === "with label as page heading" )
93+ ?. options ,
94+ } ,
7395} ;
7496
7597export const WithWordCount : Story = {
7698 name : "with word count" ,
77- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with word count" ) ?. options } ,
99+ args : {
100+ ...examplesFromFixtures . find ( ( f ) => f . name === "with word count" ) ?. options ,
101+ } ,
78102} ;
79103
80104export const WithThreshold : Story = {
81105 name : "with threshold" ,
82- args : { ...examplesFromFixtures . find ( ( f ) => f . name === "with threshold" ) ?. options } ,
83- } ;
106+ args : {
107+ ...examplesFromFixtures . find ( ( f ) => f . name === "with threshold" ) ?. options ,
108+ } ,
109+ } ;
0 commit comments