import { Meta, StoryObj } from '@storybook/react-vite'; import { Label } from "../../Label"; import { Input } from ".."; import { Button } from "../../Button"; import { HelperText } from "../../HelperText"; const meta = { title: "Input/Root", component: Input.Root, args: { type: "text", disabled: false, placeholder: "Label" }, argTypes: { type: { description: "Uma string especificando o tipo de controle a ser renderizado.", control: { type: "select" }, table: { defaultValue: { summary: "text" }, type: { summary: "string", } }, options: [ "button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week" ], }, placeholder: { description: "Uma string que define o texto de ajuda que é exibido quando o input está vazio.", control: { type: "text" }, table: { defaultValue: { summary: "Label" } }, }, disabled: { description: "Se o input está desabilitado", control: { type: "boolean" }, table: { defaultValue: { summary: "false" }, }, }, }, parameters: { layout: "centered", }, } satisfies Meta<{}>; export default meta; type Story = StoryObj; export const Default: Story = { args: {}, render: function (args) { return (
) } }; export const Disabled: Story = { args: { disabled: true }, render: function (args) { return (
) } } export const WithLabel: Story = { args: {}, render: function (args) { return (
); }, }; export const WithHelper: Story = { args: { id: "label", }, render: function (args) { return ( Seu texto de apoio aparecerá aqui. ); }, }; export const WithButton: Story = { args: {}, render: function (args) { return (
) } }