feat: add Textarea component

This commit is contained in:
hafidnrzs
2025-03-16 01:40:02 +07:00
parent fb99b41b3a
commit a07e3c21d6
4 changed files with 110 additions and 0 deletions
@@ -0,0 +1,49 @@
import { Meta, StoryObj } from "@storybook/react";
import { Textarea } from "./textarea";
const meta: Meta = {
title: "Components/Textarea",
component: Textarea,
argTypes: {
size: {
control: "select",
options: ["sm", "md", "lg"],
},
},
};
export default meta;
type Story = StoryObj<typeof Textarea>;
export const Large: Story = {
args: {
size: "lg",
placeholder: "Placeholder",
},
};
export const Medium: Story = {
args: {
size: "md",
},
};
export const Small: Story = {
args: {
size: "sm",
},
};
export const Disabled: Story = {
args: {
size: "md",
disabled: true,
},
};
export const WithError: Story = {
args: {
size: "md",
error: "Error message",
},
};