All files index.stories.js

0% Statements 0/7
100% Branches 0/0
0% Functions 0/1
0% Lines 0/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                                   
import React from "react"
import { storiesOf } from "@storybook/react"
import { action } from "@storybook/addon-actions"
import TreeSelect from "."
 
const nodes = [
    { id: 1, label: "Business > All" },
    { id: 2, parent: 1, label: "Business > S1" },
    { id: 3, parent: 1, label: "Business > S2" },
    { id: 4, label: "Business > All" },
    { id: 5, parent: 4, label: "Business > S1" },
    { id: 6, parent: 4, label: "Business > S2" }
]
 
storiesOf("TreeSelect", module).add("with text", () => (
    <TreeSelect onChange={action("changed")} nodes={nodes} />
))