ReactJS: Formatting a border

This entry is part 9 of 35 in the series React JS

https://codepen.io/gaearon/pen/ozqNOV

function FancyBorder(props) {
  return (
    <div className={'FancyBorder FancyBorder-' + props.color}>
      {props.children}
    </div>
  );
}

function WelcomeDialog() {
  return (
    <FancyBorder color="blue">
      <h1 className="Dialog-title">
        Welcome
      </h1>
      <p className="Dialog-message">
        Thank you for visiting our spacecraft!
      </p>
    </FancyBorder>
  );
}

ReactDOM.render(
  <WelcomeDialog />,
  document.getElementById('root')
);

Series Navigation<< ReactJS: Hello World in React
ReactJS: Format A Name >>