From e8bac61a7f0be6c60624b00e06ab8d00efc932f8 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 4 Apr 2022 18:46:05 +0200 Subject: chore: add a PlusMinus icon component --- src/components/atoms/icons/plus-minus.stories.tsx | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/components/atoms/icons/plus-minus.stories.tsx (limited to 'src/components/atoms/icons/plus-minus.stories.tsx') diff --git a/src/components/atoms/icons/plus-minus.stories.tsx b/src/components/atoms/icons/plus-minus.stories.tsx new file mode 100644 index 0000000..1b5086a --- /dev/null +++ b/src/components/atoms/icons/plus-minus.stories.tsx @@ -0,0 +1,73 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import PlusMinusIcon from './plus-minus'; + +export default { + title: 'Atoms/Icons', + component: PlusMinusIcon, + args: { + ariaHidden: true, + }, + argTypes: { + additionalClasses: { + control: { + type: 'text', + }, + description: 'Set additional classes.', + table: { + category: 'Options', + }, + type: { + name: 'string', + required: false, + }, + }, + ariaHidden: { + control: { + type: 'boolean', + }, + description: 'Should be hidden for accessibility.', + table: { + category: 'Options', + defaultValue: { summary: true }, + }, + type: { + name: 'boolean', + required: false, + }, + }, + ariaLabel: { + control: { + type: 'text', + }, + description: 'An accessible name.', + table: { + category: 'Options', + }, + type: { + name: 'string', + required: false, + }, + }, + state: { + control: { + type: 'radio', + options: ['plus', 'minus'], + }, + description: 'Which state should be displayed.', + type: { + name: 'enum', + required: true, + value: ['plus', 'minus'], + }, + }, + }, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + +); + +export const PlusMinus = Template.bind({}); +PlusMinus.args = { + state: 'plus', +}; -- cgit v1.2.3