Skip to content
Merged
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
chore(site): add Form storybook
  • Loading branch information
BrunoQuaresma committed Mar 8, 2024
commit 684cd694be4063d66dc7ea3512493e989063d94d
36 changes: 36 additions & 0 deletions site/src/components/Form/Form.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import TextField from "@mui/material/TextField";
import type { Meta, StoryObj } from "@storybook/react";
import { Form, FormFields, FormSection } from "./Form";

const meta: Meta<typeof Form> = {
title: "components/Form",
component: Form,
args: {
children: (
<FormSection
title="General"
description="The name of the workspace and its owner. Only admins can create workspace for other users."
>
<FormFields>
<TextField label="Workspace Name" />
<TextField label="Owner" />
</FormFields>
</FormSection>
),
},
};

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

export const Vertical: Story = {
args: {
direction: "vertical",
},
};

export const Horizontal: Story = {
args: {
direction: "horizontal",
},
};