refactor inputs
This commit is contained in:
1 parent
2c5d64ab86
commit
549f52655b
45 files changed
+301
-256
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
import { Page } from "components/Page";
|
||||
import { useState } from "react";
|
||||
|
||||
import { InputTimeEntity } from "./InputTimeEntity";
|
||||
|
||||
export default {
|
||||
title: "Inputs/InputTimeEntity",
|
||||
component: InputTimeEntity,
|
||||
parameters: { actions: { argTypesRegex: "^on.*" } },
|
||||
} as ComponentMeta<typeof InputTimeEntity>;
|
||||
|
||||
const Template: ComponentStory<typeof InputTimeEntity> = (args) => {
|
||||
const [value, setValue] = useState("");
|
||||
return (
|
||||
<Page>
|
||||
<div
|
||||
style={{
|
||||
padding: "1em",
|
||||
}}
|
||||
>
|
||||
<InputTimeEntity
|
||||
{...args}
|
||||
value={value}
|
||||
onChange={(t) => {
|
||||
setValue(t);
|
||||
args.onChange(t);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
|
||||
export const SimpleText = Template.bind({});
|
||||
Reference in new issue
Block a user