feat: add core UI components and baseline tests
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import { Label } from "@ai-ui/ui";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta = {
|
||||
title: "Components/Label",
|
||||
component: Label,
|
||||
args: {
|
||||
children: "Email address"
|
||||
},
|
||||
argTypes: {
|
||||
children: {
|
||||
control: "text"
|
||||
},
|
||||
className: {
|
||||
control: false
|
||||
},
|
||||
requiredIndicator: {
|
||||
control: "boolean"
|
||||
}
|
||||
},
|
||||
parameters: {
|
||||
layout: "centered"
|
||||
},
|
||||
tags: ["autodocs"]
|
||||
} satisfies Meta<typeof Label>;
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Playground: Story = {};
|
||||
|
||||
export const Required: Story = {
|
||||
args: {
|
||||
requiredIndicator: true
|
||||
}
|
||||
};
|
||||
|
||||
export const Invalid: Story = {
|
||||
args: {
|
||||
"aria-invalid": true
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user