feat(ui): add Button, Input, Label atoms and FormField molecule with stories
This commit is contained in:
31
packages/ui/src/molecules/form-field/form-field.stories.tsx
Normal file
31
packages/ui/src/molecules/form-field/form-field.stories.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { FormField } from "./form-field.js";
|
||||
|
||||
const meta = {
|
||||
title: "Molecules/FormField",
|
||||
component: FormField,
|
||||
tags: ["autodocs"],
|
||||
} satisfies Meta<typeof FormField>;
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: { label: "Email", placeholder: "you@example.com", type: "email" },
|
||||
};
|
||||
|
||||
export const WithDescription: Story = {
|
||||
args: {
|
||||
label: "Username",
|
||||
placeholder: "johndoe",
|
||||
description: "Must be 3-31 characters",
|
||||
},
|
||||
};
|
||||
|
||||
export const WithError: Story = {
|
||||
args: {
|
||||
label: "Password",
|
||||
type: "password",
|
||||
error: "Password must be at least 6 characters",
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user