mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00
20 lines
456 B
React
20 lines
456 B
React
![]() |
import React, { PropTypes, Component } from 'react';
|
||
|
import { Alert } from 'react-bootstrap';
|
||
|
|
||
|
const Flash = () => {
|
||
|
|
||
|
let type = this.props.message.type;
|
||
|
type = type === "error" ? "danger" : type; // if type is "error", use "danger" instead
|
||
|
|
||
|
return (
|
||
|
<Alert className="flash-message" bsStyle={type}>
|
||
|
{this.props.message.content}
|
||
|
</Alert>
|
||
|
)
|
||
|
}
|
||
|
|
||
|
Flash.propTypes = {
|
||
|
message: React.PropTypes.object.isRequired
|
||
|
}
|
||
|
|
||
|
export default Flash;
|