import { useRef, useState } from "react"; import { commonProps } from "../../../utils/storybook"; import { Icons } from "../../icons"; import { Box } from "../../box"; import { Flex } from "../../flex"; import { Text } from "../../text"; import { Button } from "../../button"; import { Input } from ".."; import { Dialog } from "../../dialog"; import type { StoryObj, Meta } from "@storybook/react"; const meta: Meta = { title: "Input & Text Area", component: Input, args: { label: "Input Label", placeholder: "Placeholder", info: "Informative message holder", multiLine: false, error: false, }, argTypes: { placeholder: { description: "Placeholder text", type: "string", table: { type: { summary: "string" } }, }, multiLine: { type: "boolean", defaultValue: { summary: "false" }, }, height: { type: "number", description: "If there is a value, will render the textarea in fix height. Only applicable when multiLine set to `true`", }, error: { description: "Sets error state on input", type: "boolean", defaultValue: { summary: "false" }, table: { type: { summary: "boolean" } }, }, disabled: { description: "Sets the `disabled` attribute", type: "boolean", defaultValue: { summary: "false" }, table: { type: { summary: "boolean" } }, }, infoEllipsis: { type: "boolean", defaultValue: { summary: "false" }, table: { type: { summary: "boolean" } }, }, raisedLabel: { type: "boolean", defaultValue: { summary: "false" }, table: { type: { summary: "boolean" } }, }, rightElement: { control: { type: "disable", }, }, ...commonProps, }, }; export default meta; type Story = StoryObj; export const Uncontrolled: Story = { render: (args) => { const ref = useRef(null); return (