b-zurg / react-collapse-pane

The splittable, draggable, collapsible panel layout library 🎉
https://storybook-collapse-pane.netlify.app/
MIT License
210 stars 35 forks source link

collapseOptions does not exist on SplitPane props #112

Open M4RC0Sx opened 3 years ago

M4RC0Sx commented 3 years ago

I can't make the exmaple from the wiki work:

<SplitPane
            split="vertical"

            collapseOptions={{
              beforeToggleButton: <Button>⬅</Button>,
              afterToggleButton: <Button>➡</Button>,
              overlayCss: { backgroundColor: "black" },
              buttonTransition: "zoom",
              buttonPositionOffset: -20,
              collapsedSize: 50,
              collapseTransitionTimeout: 350,
            }}
          >
Type '{ children: Element[]; split: "vertical"; collapseOptions: { beforeToggleButton: Element; afterToggleButton: Element; overlayCss: { backgroundColor: string; }; buttonTransition: string; buttonPositionOffset: number; collapsedSize: number; collapseTransitionTimeout: number; }; }' is not assignable to type 'IntrinsicAttributes & SplitPaneProps & { children?: ReactNode; }'.
  Property 'collapseOptions' does not exist on type 'IntrinsicAttributes & SplitPaneProps & { children?: ReactNode; }'.ts(2322)
shubham-latiyan commented 3 years ago

Use collapse={{ }}