Vulcan/packages/vulcan-forms/lib/components/Flash.jsx

28 lines
817 B
React
Raw Normal View History

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';
2018-03-26 17:50:03 +09:00
// const Flash = ({message, type}) => {
2018-03-26 17:50:03 +09:00
// type = type === "error" ? "danger" : type; // if type is "error", use "danger" instead
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>
// )
// }
2018-03-26 17:50:03 +09:00
// Flash.propTypes = {
// message: PropTypes.oneOfType([PropTypes.object.isRequired, PropTypes.array.isRequired])
// }
2018-03-26 17:50:03 +09:00
// registerComponent('FormFlash', Flash);