Files
Shortumation/webapp/src/components/Inputs/InputAutoText.stories.tsx
T
2022-07-27 21:09:30 -04:00

30 lines
712 B
TypeScript

import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import InputAutoText from "./InputAutoText";
export default {
title: "Inputs/InputAutoText",
component: InputAutoText,
parameters: { actions: { argTypesRegex: "^on.*" } },
args: {
label: "Something",
value: "",
options: ["test", "usa", "canada"],
},
} as ComponentMeta<typeof InputAutoText>;
const Template: ComponentStory<typeof InputAutoText> = (args) => {
return (
<Page>
<InputAutoText {...args} />
</Page>
);
};
export const Basic = Template.bind({});
export const WithError = Template.bind({});
WithError.args = {
...WithError.args,
error: "Oh no!",
};