Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var React = require('react');
- var Headings = React.createClass({
- propTypes: {
- h1: React.PropTypes.string.isRequired,
- h2: React.PropTypes.string,
- name: React.PropTypes.string
- },
- render: function render() {
- var h1 = (this.props.name) ? this.props.name + ', ' + h1 : h1;
- var h2 = this.props.h2 || '';
- return (
- <div className="wrap" name={this.user.first_name || 'Congratulations'}>
- <h1 className="headline">{h1}</h1>
- <h2 className="subheadline"> {h2}</h2>
- </div>
- );
- }
- });
- module.exports = Headings;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement