Skip to content

Commit

Permalink
fixup! Feat(web-react): Introduce Navigation #DS-1524
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Dec 4, 2024
1 parent 7eaa5ed commit 3f64d3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@ const meta: Meta<typeof Navigation> = {
page: () => <Markdown>{ReadMe}</Markdown>,
},
},
argTypes: {
children: {
control: 'object',
},
},
args: {
children: (
<>
<NavigationItem>
<NavigationLink href="/" isSelected>
<NavigationLink href="#" isSelected>
Home
</NavigationLink>
</NavigationItem>
<NavigationItem>
<NavigationLink href="/">Not Home</NavigationLink>
<NavigationLink href="#">Not Home</NavigationLink>
</NavigationItem>
</>
),
Expand All @@ -33,6 +38,6 @@ const meta: Meta<typeof Navigation> = {
export default meta;
type Story = StoryObj<typeof Navigation>;

export const Playground: Story = {
export const NavigationPlayground: Story = {
name: 'Navigation',
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ const meta: Meta<typeof NavigationItem> = {
},
},
args: {
children: (
<NavigationLink href="/" isSelected>
Home
</NavigationLink>
),
children: <NavigationLink href="/">Link</NavigationLink>,
},
};

export default meta;
type Story = StoryObj<typeof NavigationItem>;

export const Playground: Story = {
export const NavigationItemPlayground: Story = {
name: 'NavigationItem',
render: (args) => (
<ul style={{ listStyle: 'none', padding: 0, margin: 0 }}>
<NavigationItem {...args} />
</ul>
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const meta: Meta<typeof NavigationLink> = {
},
},
args: {
children: 'Home',
children: 'Link',
isDisabled: false,
isSelected: false,
},
Expand Down

0 comments on commit 3f64d3c

Please sign in to comment.