Skip to content

Commit 97594f2

Browse files
feat(Simulator/WalletHome/CategoryTabs): create stories
1 parent 13f8b52 commit 97594f2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { useState } from "react"
2+
import { Meta, StoryObj } from "@storybook/react"
3+
4+
import { CategoryTabs } from "../CategoryTabs"
5+
6+
const meta = {
7+
title: "Molecules / Display Content / Simulator / WalletHome / CategoryTabs",
8+
component: CategoryTabs,
9+
args: {
10+
categories: ["My contacts", "Recent"],
11+
},
12+
} satisfies Meta<typeof CategoryTabs>
13+
14+
export default meta
15+
16+
type Story = StoryObj<typeof meta>
17+
18+
export const Default: Story = {}
19+
20+
const ActiveTab: Story["render"] = (args) => {
21+
const [activeTabIndex, setActiveTabIndex] = useState(1)
22+
23+
return (
24+
<CategoryTabs
25+
{...args}
26+
activeIndex={activeTabIndex}
27+
setActiveIndex={setActiveTabIndex}
28+
/>
29+
)
30+
}
31+
32+
export const SelectActiveTab: Story = {
33+
render: (args) => <ActiveTab {...args} />,
34+
}

0 commit comments

Comments
 (0)