mirror of
https://github.com/vale981/Vulcan
synced 2025-03-07 02:21:43 -05:00
21 lines
No EOL
452 B
JavaScript
21 lines
No EOL
452 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Alert from 'react-bootstrap/lib/Alert'
|
|
|
|
const Flash = ({message}) => {
|
|
|
|
let type = message.type;
|
|
type = type === "error" ? "danger" : type; // if type is "error", use "danger" instead
|
|
|
|
return (
|
|
<Alert className="flash-message" bsStyle={type}>
|
|
{message.content}
|
|
</Alert>
|
|
)
|
|
}
|
|
|
|
Flash.propTypes = {
|
|
message: PropTypes.object.isRequired
|
|
}
|
|
|
|
export default Flash; |