Created
October 24, 2016 23:54
-
-
Save maypo/ae511aec096060ae963c4bc4231c702b to your computer and use it in GitHub Desktop.
message stateless component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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