From a724b4b38bacc631410627395b0d1190a0e8de0d Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 4 Oct 2023 18:16:55 +0200 Subject: feat(components): add a VisuallyHidden component --- .../visually-hidden/visually-hidden.stories.tsx | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/components/atoms/visually-hidden/visually-hidden.stories.tsx (limited to 'src/components/atoms/visually-hidden/visually-hidden.stories.tsx') 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; + +const Template: ComponentStory = (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. '} + Any link. + + ), +}; -- cgit v1.2.3