Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/components/LeftNavBar/LeftNavbar.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Meta, StoryObj } from "@storybook/react"

import LeftNavBarComponent from "."

const meta = {
title: "Molecules / Navigation / LeftNavBar",
component: LeftNavBarComponent,
parameters: {
layout: "fullscreen",
},
decorators: [
(Story) => (
<div className="max-w-[496px]">
<Story />
</div>
),
],
} satisfies Meta<typeof LeftNavBarComponent>

export default meta

type Story = StoryObj<typeof meta>

const mockTocItems = [
{
id: "section-1",
title: "Section 1",
url: "#section-1",
items: [
{
id: "subsection-1",
title: "Subsection 1",
url: "#subsection-1",
},
],
},
{
id: "section-2",
title: "Section 2",
url: "#section-2",
},
]

export const LeftNavBar: Story = {
args: {
tocItems: mockTocItems,
maxDepth: 2,
},
}