Sha256: 4864ebfbafeeeceebaa24255e78e9a83873a9fe9e243558dbb89183b91edc3fb
Contents?: true
Size: 688 Bytes
Versions: 6
Compression:
Stored size: 688 Bytes
Contents
Rev.registerComponent('StatelessTabContent', class extends React.Component { static get propTypes() { return { activeKey: React.PropTypes.string.isRequired, } } constructor(props) { super(props) this.renderChild = this.renderChild.bind(this) } get className() { return this.classAdd({ 'RevTabs-content': true, 'tabs-content': true, }) } renderChild(child) { let newProps = { key: child.key, active: child.key === this.props.activeKey, } return React.cloneElement(child, newProps) } render() { return <div className={this.className}> {this.mapChildren(this.renderChild)} </div> } })
Version data entries
6 entries across 6 versions & 1 rubygems