From 5d3e8a4d0c2ce2ad8f22df857ab3ce54fcfc38ac Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 3 Nov 2023 12:22:47 +0100 Subject: refactor(components): replace Toolbar with Navbar component * remove SearchModal and SettingsModal components * add a generic NavbarItem component (instead of the previous toolbar items to avoid unreadable styles...) * move FlippingLabel component logic into NavbarItem since it is only used here --- .../organisms/toolbar/main-nav.stories.tsx | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 src/components/organisms/toolbar/main-nav.stories.tsx (limited to 'src/components/organisms/toolbar/main-nav.stories.tsx') diff --git a/src/components/organisms/toolbar/main-nav.stories.tsx b/src/components/organisms/toolbar/main-nav.stories.tsx deleted file mode 100644 index 31e2b65..0000000 --- a/src/components/organisms/toolbar/main-nav.stories.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import type { ComponentMeta, ComponentStory } from '@storybook/react'; -import { useToggle } from '../../../utils/hooks'; -import { MainNavItem } from './main-nav'; - -/** - * MainNavItem - Storybook Meta - */ -export default { - title: 'Organisms/Toolbar/MainNavItem', - component: MainNavItem, - argTypes: { - className: { - control: { - type: 'text', - }, - description: 'Set additional classnames to the main nav wrapper.', - table: { - category: 'Styles', - }, - type: { - name: 'string', - required: false, - }, - }, - isActive: { - control: { - type: null, - }, - description: 'Determine if the main nav is open or not.', - type: { - name: 'boolean', - required: true, - }, - }, - items: { - description: 'The main nav items.', - type: { - name: 'object', - required: true, - value: {}, - }, - }, - setIsActive: { - control: { - type: null, - }, - description: 'A callback function to change main nav state.', - table: { - category: 'Events', - }, - type: { - name: 'function', - required: true, - }, - }, - }, -} as ComponentMeta; - -const Template: ComponentStory = ({ - isActive = false, - setIsActive: _setIsActive, - ...args -}) => { - const [isOpen, toggle] = useToggle(isActive); - - return ; -}; - -/** - * MainNavItem Stories - Inactive - */ -export const Inactive = Template.bind({}); -Inactive.args = { - isActive: false, - items: [ - { id: 'home', label: 'Home', href: '#' }, - { id: 'contact', label: 'Contact', href: '#' }, - ], -}; - -/** - * MainNavItem Stories - Active - */ -export const Active = Template.bind({}); -Active.args = { - isActive: true, - items: [ - { id: 'home', label: 'Home', href: '#' }, - { id: 'contact', label: 'Contact', href: '#' }, - ], -}; -- cgit v1.2.3