moving things around

This commit is contained in:
ari committed 2022-08-05 22:04:31 -04:00
1 parent 549f52655b
commit d22bba8c4d
41 files changed
+227 -337

No files matched your search

@@ -0,0 +1,40 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import { useState } from "react";
import { AutomationTime } from "types/automations/common";
import { InputTime } from "./InputTime";
export default {
title: "Inputs/InputTime",
component: InputTime,
parameters: { actions: { argTypesRegex: "^on.*" } },
} as ComponentMeta<typeof InputTime>;
const Template: ComponentStory<typeof InputTime> = (args) => {
const [value, setValue] = useState<AutomationTime | undefined>(undefined);
return (
<Page>
<div
style={{
padding: "1em",
}}
>
<InputTime
{...args}
value={args.restrictEmpty ? "00:00:00" : value}
onChange={(t) => {
setValue(t);
args.onChange(t);
}}
/>
</div>
</Page>
);
};
export const SimpleText = Template.bind({});
SimpleText.args = {
label: "Time Stamp",
value: "10",
};