aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/buttons/main-nav-button.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-14 19:12:54 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-14 19:24:46 +0200
commit15fd9f4a6ecf947c7648c6b7865b97c40124fde1 (patch)
tree528ef96e731b0dd9c3c15d398b75f2877473289e /src/components/molecules/buttons/main-nav-button.stories.tsx
parent872b0c172a38db4f440dc6044eb1d5725c03abb1 (diff)
chore: add a MainNav component
Diffstat (limited to 'src/components/molecules/buttons/main-nav-button.stories.tsx')
-rw-r--r--src/components/molecules/buttons/main-nav-button.stories.tsx80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/components/molecules/buttons/main-nav-button.stories.tsx b/src/components/molecules/buttons/main-nav-button.stories.tsx
deleted file mode 100644
index 39e495c..0000000
--- a/src/components/molecules/buttons/main-nav-button.stories.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import { ComponentMeta, ComponentStory } from '@storybook/react';
-import { useState } from 'react';
-import { IntlProvider } from 'react-intl';
-import MainNavButtonComponent from './main-nav-button';
-
-export default {
- title: 'Molecules/Buttons',
- component: MainNavButtonComponent,
- argTypes: {
- checkboxClassName: {
- control: {
- type: 'text',
- },
- description: 'Set additional classnames to the checkbox.',
- table: {
- category: 'Styles',
- },
- type: {
- name: 'string',
- required: false,
- },
- },
- isActive: {
- control: {
- type: null,
- },
- description: 'The button state.',
- type: {
- name: 'boolean',
- required: true,
- },
- },
- labelClassName: {
- control: {
- type: 'text',
- },
- description: 'Set additional classnames to the label.',
- table: {
- category: 'Styles',
- },
- type: {
- name: 'string',
- required: false,
- },
- },
- setIsActive: {
- control: {
- type: null,
- },
- description: 'A callback function to set the button state.',
- type: {
- name: 'function',
- required: true,
- },
- },
- },
-} as ComponentMeta<typeof MainNavButtonComponent>;
-
-const Template: ComponentStory<typeof MainNavButtonComponent> = ({
- isActive,
- setIsActive: _setIsActive,
- ...args
-}) => {
- const [isChecked, setIsChecked] = useState<boolean>(isActive);
-
- return (
- <IntlProvider locale="en">
- <MainNavButtonComponent
- isActive={isChecked}
- setIsActive={setIsChecked}
- {...args}
- />
- </IntlProvider>
- );
-};
-
-export const MainNavButton = Template.bind({});
-MainNavButton.args = {
- isActive: false,
-};