cleaned up styling for editor
This commit is contained in:
1 parent
bfc95db6f6
commit
4cfc429980
25 files changed
+532
-230
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
import { useState } from "react";
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
import { InputList } from "./InputList";
|
||||
|
||||
@@ -12,7 +12,12 @@ export default {
|
||||
|
||||
const Template: ComponentStory<typeof InputList> = args => {
|
||||
|
||||
const [value, setValue] = useState('')
|
||||
const [value, setValue] = useState(args.current);
|
||||
useEffect(() => {
|
||||
if (value !== args.current) {
|
||||
setValue(args.current)
|
||||
}
|
||||
}, [args.current])
|
||||
return <div className="page">
|
||||
<InputList {...args} current={value} onChange={setValue} />
|
||||
</div>
|
||||
@@ -27,3 +32,15 @@ SimpleText.args = {
|
||||
"Toots"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
export const InvalidSelection = Template.bind({})
|
||||
InvalidSelection.args = {
|
||||
current: "Derek",
|
||||
label: "Entity ID",
|
||||
options: [
|
||||
'Bob',
|
||||
'Martin',
|
||||
"Toots"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user