moved back the components
This commit is contained in:
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>
|
||||
}
|
||||
Reference in new issue
Block a user