React Simple Panels
A simple React Panels without tabs and internal state
Installation
npm install --save react-simple-panels
Example
;; const Types = FIRST: 'FIRST' SECOND: 'SECOND' THIRD: 'THIRD' state = activeIndex: TypesFIRTS { return <PanelList activeIndex=thisstateactiveIndex> <Panel index=TypesFIRST> <span onClick= this> This is a first panel </span> </Panel> <Panel index=TypesSECOND> <span onClick= this> This is a second panel </span> </Panel> <Panel index=TypesTHIRD> <span onClick= this> This is a third panel </span> </Panel> </PanelList> } { this; }
Props
PanelList:
activeIndex
: Name of the panel index you want to be active.- anything else you'd like to set on the containing div
Panel:
index
: a unique name for the panel.- anything else you'd like to set on the panel's containing div.