All files / owid-grapher/grapher/controls/CollapsibleList CollapsibleList.stories.tsx

100% Statements 43/43
100% Branches 2/2
100% Functions 2/2
100% Lines 43/43

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
import * as React from "react"
import { CollapsibleList, MoreButton } from "./CollapsibleList"
import { collapsibleListSampleItems } from "./CollapsibleList.sampleInput"
 
export default {
    title: "CollapsibleList",
    component: CollapsibleList,
}
 
export const CollapsibleListComponent = (): JSX.Element => {
    return <CollapsibleList>{collapsibleListSampleItems}</CollapsibleList>
}
 
export const MoreButtonComponent = (): JSX.Element => {
    const options = [
        <div key="option1">option1</div>,
        <div key="option2">option2</div>,
        <div key="option3">option3</div>,
    ]
 
    return <MoreButton options={options} />
}