2018-03-26 17:50:03 +09:00
|
|
|
// import React from 'react';
|
|
|
|
// import PropTypes from 'prop-types';
|
|
|
|
// import Alert from 'react-bootstrap/lib/Alert'
|
|
|
|
// import { registerComponent } from 'meteor/vulcan:core';
|
2016-06-14 10:45:03 +09:00
|
|
|
|
2018-03-26 17:50:03 +09:00
|
|
|
// const Flash = ({message, type}) => {
|
2016-06-14 10:45:03 +09:00
|
|
|
|
2018-03-26 17:50:03 +09:00
|
|
|
// type = type === "error" ? "danger" : type; // if type is "error", use "danger" instead
|
2016-06-14 10:45:03 +09:00
|
|
|
|
2018-03-26 17:50:03 +09:00
|
|
|
// return (
|
|
|
|
// <Alert className="flash-message" bsStyle={type}>
|
|
|
|
// {Array.isArray(message) ?
|
|
|
|
// <ul>
|
|
|
|
// {message.map((message, index) =>
|
|
|
|
// <li key={index}>{message.content}</li>
|
|
|
|
// )}
|
|
|
|
// </ul>
|
|
|
|
// : <span>{message.content}</span>
|
|
|
|
// }
|
|
|
|
// </Alert>
|
|
|
|
// )
|
|
|
|
// }
|
2016-06-14 10:45:03 +09:00
|
|
|
|
2018-03-26 17:50:03 +09:00
|
|
|
// Flash.propTypes = {
|
|
|
|
// message: PropTypes.oneOfType([PropTypes.object.isRequired, PropTypes.array.isRequired])
|
|
|
|
// }
|
2016-06-14 10:45:03 +09:00
|
|
|
|
2018-03-26 17:50:03 +09:00
|
|
|
// registerComponent('FormFlash', Flash);
|