Files
Shortumation/webapp/src/components/Inputs/InputYaml.stories.tsx
T
2022-05-24 21:12:01 -04:00

28 lines
647 B
TypeScript

import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import { useState } from "react";
import InputYaml from "./InputYaml";
export default {
title: 'Inputs/InputYaml',
component: InputYaml,
parameters: { actions: { argTypesRegex: '^on.*' } },
} as ComponentMeta<typeof InputYaml>;
const Template: ComponentStory<typeof InputYaml> = args => {
const [value, setValue] = useState({
"test": "data"
})
return <Page>
<InputYaml {...args} value={value} onChange={setValue} />
</Page>
}
export const SimpleText = Template.bind({})
SimpleText.args = {
label: "Template",
}