UNPKG

react-toolbox-build4server

Version:

Builds react-toolbox in such a way that it's components can be required and used in node - most likely for server-side rendered webapps - without having to depend on webpack to build your entire server-side project

31 lines (25 loc) 691 B
import React from 'react'; import style from './style'; class TabContent extends React.Component { static propTypes = { active: React.PropTypes.bool, children: React.PropTypes.node, className: React.PropTypes.string, tabIndex: React.PropTypes.number }; static defaultProps = { active: false, className: '' }; render () { let className = style.tab; if (this.props.active) className += ` ${style.active}`; if (this.props.className) className += ` ${this.props.className}`; return ( <section className={className} tabIndex={this.props.tabIndex}> {this.props.children} </section> ); } } export default TabContent;