app-template/packages/ui/stories/input.stories.tsx

31 lines
595 B
TypeScript

import type { Meta, StoryObj } from "@storybook/react";
import { Input } from "../src/index.js";
const meta = {
title: "Basic/Input",
component: Input,
tags: ["autodocs"],
args: {
placeholder: "请输入…",
},
} satisfies Meta<typeof Input>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {};
export const Disabled: Story = {
args: {
disabled: true,
value: "禁用态",
},
};
export const WithType: Story = {
args: {
type: "email",
placeholder: "input@example.com",
},
};