You can do it like this:
class Div extends React.Component { render() { return (<div className={this.props.cl} > {this.props.children}</div> ); } }; export default Div;
And use
<Div cl="my_class"></Div>