Skip to content

Commit b1e1271

Browse files
committed
chore: Add story for OverflowY
1 parent 5b249d5 commit b1e1271

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Meta, StoryObj } from "@storybook/react";
2+
import { OverflowY } from "./OverflowY";
3+
4+
const numbers: number[] = [];
5+
for (let i = 0; i < 20; i++) {
6+
numbers.push(i + 1);
7+
}
8+
9+
const meta: Meta<typeof OverflowY> = {
10+
title: `components/${OverflowY.name}`,
11+
component: OverflowY,
12+
args: {
13+
maxHeight: 400,
14+
children: numbers.map((num, i) => (
15+
<p
16+
key={num}
17+
style={{
18+
height: "50px",
19+
padding: 0,
20+
margin: 0,
21+
backgroundColor: i % 2 === 0 ? "white" : "gray",
22+
}}
23+
>
24+
Element {num}
25+
</p>
26+
)),
27+
},
28+
};
29+
30+
export default meta;
31+
32+
type Story = StoryObj<typeof OverflowY>;
33+
export const Example: Story = {};

0 commit comments

Comments
 (0)