Files
Shortumation/webapp/src/components/Inputs/AutoComplete/InputService.stories.tsx
T
2022-08-30 21:50:43 -04:00

40 lines
759 B
TypeScript

import { useState } from "react";
import { InputService } from "./InputService";
import { makeStory } from "devUtils";
const { make, componentMeta } = makeStory({
Component: InputService,
meta: {
title: "Inputs/InputService",
},
BaseTemplate: (args) => {
const [value, setValue] = useState(args.value);
return (
<div
style={{
maxWidth: 200,
}}
>
<InputService
{...args}
value={value as any}
onChange={(v: any) => {
setValue(v);
args.onChange(v as any);
}}
/>
</div>
);
},
});
export default componentMeta;
export const Example = make({});
export const Single = make({
multiple: false,
value: "",
});