-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: some styling changes on the navigations
- Loading branch information
1 parent
2a4bf5a
commit a7c730b
Showing
3 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
64 changes: 38 additions & 26 deletions
64
packages/web/src/ui/common/navigation/nav-link/nav-link.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,57 @@ | ||
import {type StoryFn, type Meta} from '@storybook/react'; | ||
import {type Meta, type StoryObj} from '@storybook/react'; | ||
import {type NavLinkDefinition} from '../navigation.types'; | ||
import {NavLink} from './nav-link'; | ||
|
||
export default { | ||
const config = { | ||
title: 'Common/Navigation/NavLink', | ||
component: NavLink, | ||
args: { | ||
href: '/example', | ||
text: 'Example', | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<div className='flex'> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
} satisfies Meta<NavLinkDefinition>; | ||
|
||
const Template: StoryFn<NavLinkDefinition> = (args) => ( | ||
<NavLink {...args} href='/example' text='Example' /> | ||
); | ||
export default config; | ||
|
||
export const LinkOnActiveSegment = Template.bind({}); | ||
LinkOnActiveSegment.storyName = 'Link on active segment'; | ||
LinkOnActiveSegment.parameters = { | ||
nextjs: { | ||
appDirectory: true, | ||
navigation: { | ||
segments: ['example'], | ||
export const LinkOnActiveSegment: StoryObj<typeof config> = { | ||
name: 'Link on active segment', | ||
parameters: { | ||
nextjs: { | ||
appDirectory: true, | ||
navigation: { | ||
segments: ['example'], | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const LinkOnInactiveSegment = Template.bind({}); | ||
LinkOnInactiveSegment.storyName = 'Link on inactive segment'; | ||
LinkOnInactiveSegment.parameters = { | ||
nextjs: { | ||
appDirectory: true, | ||
navigation: { | ||
segments: ['foo'], | ||
export const LinkOnInactiveSegment: StoryObj<typeof config> = { | ||
name: 'Link on inactive segment', | ||
parameters: { | ||
nextjs: { | ||
appDirectory: true, | ||
navigation: { | ||
segments: ['foo'], | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const LinkOnRootSegment = Template.bind({}); | ||
LinkOnRootSegment.storyName = 'Link on root segment'; | ||
LinkOnRootSegment.parameters = { | ||
nextjs: { | ||
appDirectory: true, | ||
navigation: { | ||
segments: [], | ||
export const LinkOnRootSegment: StoryObj<typeof config> = { | ||
name: 'Link on root segment', | ||
parameters: { | ||
nextjs: { | ||
appDirectory: true, | ||
navigation: { | ||
segments: [], | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters