Skip to content

Instantly share code, notes, and snippets.

@maypo
Created October 24, 2016 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maypo/ae511aec096060ae963c4bc4231c702b to your computer and use it in GitHub Desktop.
Save maypo/ae511aec096060ae963c4bc4231c702b to your computer and use it in GitHub Desktop.
message stateless component
import React from 'react';
const Message = ({ title, subtitle }) => (
<div className="message-wrapper">
{title ? <div className="title-message">{title}</div> : null}
{subtitle ? <div className="subtitle-message">{subtitle}</div> : null}
</div>
);
Message.propTypes = {
title: React.PropTypes.string,
subtitle: React.PropTypes.string,
};
export default Message;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment