Sha256: de492d6db0093859251b89d8e558847ee6de87134a28febd531b7ef459f49611
Contents?: true
Size: 651 Bytes
Versions: 6
Compression:
Stored size: 651 Bytes
Contents
Rev.registerComponent('Tabs', class extends React.Component { static get propTypes() { return { activeKey: React.PropTypes.string, onChange: React.PropTypes.function, } } 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
6 entries across 6 versions & 1 rubygems