diff options
Diffstat (limited to 'src/components/atoms/visually-hidden/visually-hidden.stories.tsx')
| -rw-r--r-- | src/components/atoms/visually-hidden/visually-hidden.stories.tsx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/components/atoms/visually-hidden/visually-hidden.stories.tsx b/src/components/atoms/visually-hidden/visually-hidden.stories.tsx new file mode 100644 index 0000000..24ac921 --- /dev/null +++ b/src/components/atoms/visually-hidden/visually-hidden.stories.tsx @@ -0,0 +1,48 @@ +import type { ComponentMeta, ComponentStory } from '@storybook/react'; +import { Link } from '../links'; +import { VisuallyHidden } from './visually-hidden'; + +/** + * Sidebar - Storybook Meta + */ +export default { + title: 'Atoms/VisuallyHidden', + component: VisuallyHidden, + argTypes: { + children: { + control: { + type: 'text', + }, + description: 'The contents to visually hide.', + type: { + name: 'string', + required: true, + }, + }, + }, +} as ComponentMeta<typeof VisuallyHidden>; + +const Template: ComponentStory<typeof VisuallyHidden> = (args) => ( + <VisuallyHidden {...args} /> +); + +/** + * VisuallyHidden Stories - Not focusable + */ +export const NotFocusable = Template.bind({}); +NotFocusable.args = { + children: 'Esse quia deserunt animi id sit voluptatem aperiam.', +}; + +/** + * VisuallyHidden Stories - Focusable + */ +export const Focusable = Template.bind({}); +Focusable.args = { + children: ( + <> + {'Esse quia deserunt animi id sit voluptatem aperiam. '} + <Link href="#">Any link.</Link> + </> + ), +}; |
