一、首先是Showcase
height="268" width="420" scrolling="no" src="//codepen.io/charleyw/embed/KVgNeK/?height=268&theme-id=0&default-tab=result" allowfullscreen="true">See the Pen <a href="http://codepen.io/charleyw/pen/KVgNeK/">http://codepen.io/charleyw/pen/KVgNeK/</a>‘>react-tabs by Wang Chao (<a href="http://codepen.io/charleyw">http://codepen.io/charleyw</a>‘>@charleyw) on <a href="http://codepen.io">http://codepen.io</a>‘>CodePen.
二、如何实现
既然用React写,那么它就必然是一个组件,首先考虑你怎么使用这个组件,也就是这个组件的接口是怎么样的。
<TabsControl>
<Tab name="red">
<div className="red"/>
</Tab>
<Tab name="blue">
<div className="blue"/>
</Tab>
<Tab name="yellow">
<div