moved back the components

This commit is contained in:
ari committed 2021-12-01 16:38:30 -05:00
1 parent 24afb602cb
commit 0764feb432
18 files changed
+786

No files matched your search

@@ -0,0 +1,43 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { useState } from "react";
import { usePageTheme } from "styles/page";
import InputTextBubble, { InputEntity } from "./InputTextBubble";
export default {
title: 'Inputs/InputTextBubble',
component: InputTextBubble,
parameters: { actions: { argTypesRegex: '^on.*' } },
argTypes: {
label: {
defaultValue: 'Sample Title'
}
}
} as ComponentMeta<typeof InputTextBubble>;
export const ArrayText: ComponentStory<typeof InputTextBubble> = args => {
const { classes } = usePageTheme({});
const [value, setValue] = useState<string | string[]>(['wow', 'lots of bubbles', 'itchen', 'bathroom'])
return <div className={classes.page}>
<div style={{ maxWidth: '200px', overflow: 'hidden' }}>
<InputTextBubble {...args} value={value} onChange={setValue} />
</div>
</div>
}
export const JustText: ComponentStory<typeof InputTextBubble> = args => {
const { classes } = usePageTheme({});
const [value, setValue] = useState<string | string[]>('hello')
return <div className={classes.page}>
<InputTextBubble {...args} value={value} onChange={setValue} />
</div>
}
export const EntityId: ComponentStory<typeof InputTextBubble> = args => {
const { classes } = usePageTheme({});
const [value, setValue] = useState<string | string[]>(['sensor.bathroom'])
return <div className={classes.page}>
<InputEntity value={value} onChange={setValue} />
</div>
}