diff --git a/packages/design-system/src/new-ui/Input/Input.stories.tsx b/packages/design-system/src/new-ui/Input/Input.stories.tsx index 333f97024..6a26ee57b 100644 --- a/packages/design-system/src/new-ui/Input/Input.stories.tsx +++ b/packages/design-system/src/new-ui/Input/Input.stories.tsx @@ -1,4 +1,5 @@ -import { Meta, StoryFn } from "@storybook/react"; +import * as React from "react"; +import { Meta, StoryObj } from "@storybook/react"; import { Input } from "./Input"; import { Icons } from "../Icons"; @@ -7,42 +8,70 @@ const meta: Meta = { }; export default meta; +type Story = StoryObj; -const TextWithIconTemplate: StoryFn = () => { - return ( - - {/* - - */} - - { - alert("hi"); - }} - > - - - - ); +export const TextWithIcon: Story = { + render: () => { + return ( + + + { + alert("hi"); + }} + > + + + + ); + }, }; -export const TextWithIcon: StoryFn = TextWithIconTemplate.bind( - {} -); +export const FileInput: Story = { + render: () => { + return ( + + + + + + + ); + }, +}; -TextWithIcon.args = {}; +const AutoresizeInputComp = () => { + const [value, setValue] = React.useState(""); -const FileTemplate: StoryFn = () => { return ( - - - - - - +
+
+
+ {value} +
+ + { + setValue(e.target.value); + }} + disabled={false} + type="text" + placeholder="Hello world" + /> + +
+
); }; -export const File: StoryFn = FileTemplate.bind({}); - -File.args = {}; +export const AutoresizeInput: Story = { + render: () => , +};