Sha256: ce70ac6e3b3e39cd16ff7465c2e9244a96213aa4b188631572a7d44ae29d9186
Contents?: true
Size: 652 Bytes
Versions: 12
Compression:
Stored size: 652 Bytes
Contents
Rev.registerComponent('Tabs', class Tabs extends React.Component { static get propTypes() { return { activeKey: React.PropTypes.string, onChange: React.PropTypes.func, } } constructor(props) { super(props) this.state = { activeKey: props.activeKey, } this.handleChange = this.handleChange.bind(this) } handleChange(e) { this.setState({activeKey: e.activeTab.key}) if(this.props.onChange) { this.props.onChange(e) } } render() { return <Rev.Components.StatelessTabs {...this.props} activeKey={this.state.activeKey} onChange={this.handleChange} /> } })
Version data entries
12 entries across 12 versions & 1 rubygems