diff --git a/src/__stories__/list-story.tsx b/src/__stories__/list-story.tsx index ceebca7ec1..5a7114d356 100644 --- a/src/__stories__/list-story.tsx +++ b/src/__stories__/list-story.tsx @@ -51,6 +51,10 @@ export default { ], control: {type: 'select'}, }, + 'aria-live': { + options: ['off', 'polite', 'assertive'], + control: {type: 'select'}, + }, }, parameters: { fullScreen: true, @@ -72,9 +76,16 @@ type Args = { disabled: boolean; danger: boolean; overInverse: boolean; + 'aria-live': 'off' | 'polite' | 'assertive'; + 'aria-atomic': boolean; }; -const Template: StoryComponent = ({ +const Template: StoryComponent< + Args & { + boxed?: boolean; + inverse?: boolean; + } +> = ({ boxed, headline, title, @@ -91,6 +102,8 @@ const Template: StoryComponent = ({ overInverse, inverse, danger, + 'aria-live': ariaLive, + 'aria-atomic': ariaAtomic, }) => { const extraContent = extra ? : undefined; @@ -105,26 +118,45 @@ const Template: StoryComponent = ({ controlProps = {href: 'https://example.org', newTab: true, right: null}; // right null removes the chevron break; case 'switch': - controlProps = {switch: {defaultValue: true, onChange: () => {}}}; + controlProps = { + switch: { + defaultValue: true, + onChange: () => {}, + }, + }; break; case 'switch and onPress': controlProps = { - switch: {defaultValue: true, onChange: () => {}}, + switch: { + defaultValue: true, + onChange: () => {}, + }, onPress, }; break; case 'checkbox': - controlProps = {checkbox: {defaultValue: true, onChange: () => {}}}; + controlProps = { + checkbox: { + defaultValue: true, + onChange: () => {}, + }, + }; break; case 'checkbox and onPress': controlProps = { - checkbox: {defaultValue: true, onChange: () => {}}, + checkbox: { + defaultValue: true, + onChange: () => {}, + }, onPress, }; break; case 'checkbox with custom element': controlProps = { - checkbox: {defaultValue: true, onChange: () => {}}, + checkbox: { + defaultValue: true, + onChange: () => {}, + }, right: () => (
@@ -229,7 +261,7 @@ const Template: StoryComponent = ({ let row = 1; const list = ( - + = (args) =>