| 2 | import {Tab, Item} from './index.js'; |
| 3 | |
| 4 | export default class TabDemo extends React.Component { |
| 5 | constructor(props){ |
| 6 | super(props); |
| 7 | this.state = { |
| 8 | index: '2', |
| 9 | }; |
| 10 | } |
| 11 | displayChange(index){ |
| 12 | this.setState({ |
| 13 | index |
| 14 | }); |
| 15 | } |
| 16 | |
| 17 | formatTab({current=null, onChange=null}){ |
| 18 | return ( |
| 19 | <Tab onChange={onChange} current={current} style={{'width': '350px'}}> |
| 20 | <Item index='0' title={<p>first</p>}> |
| 21 | <h4>The first tab content</h4> |
| 22 | <p>React.js is pretty awesome</p> |
| 23 | </Item> |
| 24 | <Item index='1' title={<p>second</p>}> |
| 25 | <h4>The second tab content</h4> |
| 26 | <p>Vue.js is pretty awesome</p> |
| 27 | </Item> |
| 28 | <Item index='2' title={<p>third</p>}> |
| 29 | <h4>The third tab content</h4> |
| 30 | <p>Ember.js is pretty awesome</p> |
| 31 | <Tab> |
| 32 | <Item index='4' title={<p>first</p>}> |
| 33 | <h4>The first tab content</h4> |
| 34 | <p>React.js is pretty awesome</p> |
| 35 | </Item> |
| 36 | <Item index='5' title={<p>second</p>}> |
| 37 | <h4>The second tab content</h4> |
| 38 | <p>Vue.js is pretty awesome</p> |
| 39 | </Item> |
| 40 | <Item index='6' title={<p>third</p>}> |
| 41 | <h4>The third tab content</h4> |
| 42 | <p>Ember.js is pretty awesome</p> |
| 43 | </Item> |
| 44 | <Item index='7' title={<p>fourth</p>}> |
| 45 | <h4>The fourth tab content</h4> |
| 46 | <p>Angular.js is pretty awesome</p> |
| 47 | <a target='_blank' href="http://braavos.me">blog</a> |
| 48 | </Item> |
| 49 | </Tab> |
| 50 | </Item> |
| 51 | <Item index='3' title={<p>fourth</p>}> |
| 52 | <h4>The fourth tab content</h4> |
| 53 | <p>Angular.js is pretty awesome</p> |
| 54 | <a target='_blank' href="http://braavos.me">blog</a> |
| 55 | </Item> |
| 56 | </Tab> |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | render() { |
| 61 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…