Skip to content

Instantly share code, notes, and snippets.

Created Oct 24, 2016
What would you like to do?
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}
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