Skip to content

Commit b8dd6b3

Browse files
chore(site): add Form storybook (#12469)
Related to #12260
1 parent 1f276a2 commit b8dd6b3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import TextField from "@mui/material/TextField";
2+
import type { Meta, StoryObj } from "@storybook/react";
3+
import { Form, FormFields, FormSection } from "./Form";
4+
5+
const meta: Meta<typeof Form> = {
6+
title: "components/Form",
7+
component: Form,
8+
args: {
9+
children: (
10+
<FormSection
11+
title="General"
12+
description="The name of the workspace and its owner. Only admins can create workspace for other users."
13+
>
14+
<FormFields>
15+
<TextField label="Workspace Name" />
16+
<TextField label="Owner" />
17+
</FormFields>
18+
</FormSection>
19+
),
20+
},
21+
};
22+
23+
export default meta;
24+
type Story = StoryObj<typeof Form>;
25+
26+
export const Vertical: Story = {
27+
args: {
28+
direction: "vertical",
29+
},
30+
};
31+
32+
export const Horizontal: Story = {
33+
args: {
34+
direction: "horizontal",
35+
},
36+
};

0 commit comments

Comments
 (0)