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

24 lines (19 loc) 555 B
import React, { PropTypes, Component } from 'react'; import ClassNames from 'classnames'; import style from './style'; class CardText extends Component { static propTypes = { children: PropTypes.any, className: PropTypes.string }; render () { const { children, className, ...other } = this.props; const classes = ClassNames(style.cardText, className); return ( <div className={classes} {...other}> {typeof children === 'string' ? <p>{children}</p> : children} </div> ); } } export default CardText;