Skip to content

Commit 70d5c6e

Browse files
author
Hector Arce De Las Heras
committed
Update carousel argtypes
Update carousel argtypes
1 parent 95efa3b commit 70d5c6e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/components/carousel/stories/argtypes.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const argtypes = (variants: IThemeObjectVariants, themeSelected: string):
190190
},
191191
pageControlVariant: {
192192
description: 'PageControl variant',
193-
type: { name: 'string', required: true },
193+
type: { name: 'string' },
194194
control: { type: 'select' },
195195
options: Object.keys(variants[themeSelected].PageControlVariant || {}),
196196
table: {
@@ -202,9 +202,9 @@ export const argtypes = (variants: IThemeObjectVariants, themeSelected: string):
202202
},
203203
pageControlArrowsControlVariant: {
204204
description: 'PageControl arrows control variant',
205-
type: { name: 'string', required: true },
205+
type: { name: 'string' },
206206
control: { type: 'select' },
207-
options: Object.keys(variants[themeSelected].PageControlAutomateVariant || {}),
207+
options: Object.keys(variants[themeSelected].ArrowsControlVariant || {}),
208208
table: {
209209
type: {
210210
summary: 'string',
@@ -302,6 +302,18 @@ export const argtypes = (variants: IThemeObjectVariants, themeSelected: string):
302302
category: CATEGORY_CONTROL.MODIFIERS,
303303
},
304304
},
305+
screenReaderText: {
306+
description:
307+
'Screen reader carousel text. Can be build using the current bar and the bars length using the keywords "{{currentPage}}" and "{{numPages}}"',
308+
type: { name: 'string' },
309+
control: { type: 'text' },
310+
table: {
311+
type: {
312+
summary: 'string',
313+
},
314+
category: CATEGORY_CONTROL.ACCESIBILITY,
315+
},
316+
},
305317
dataTestId: {
306318
description: 'String used for testing',
307319
control: { type: 'text' },

0 commit comments

Comments
 (0)