diff --git a/app/javascript/src/components/FlashMessages/components/Alert.jsx b/app/javascript/src/components/FlashMessages/components/Alert.jsx
new file mode 100644
index 000000000..523461956
--- /dev/null
+++ b/app/javascript/src/components/FlashMessages/components/Alert.jsx
@@ -0,0 +1,83 @@
+import React, { Component } from "react";
+import PropTypes from "prop-types";
+
+class Alert extends Component {
+
+ static alertClass (type) {
+ const classes = {
+ error: "alert-danger",
+ alert: "alert-warning",
+ notice: "alert-info",
+ success: "alert-success"
+ };
+ return classes[type] || classes.success;
+ }
+
+ static glyphiconClass (type) {
+ const classes = {
+ error: "glyphicon-exclamation-sign",
+ alert: "glyphicon-exclamation-sign",
+ notice: "glyphicon-info-sign",
+ success: "glyphicon-ok-sign"
+ };
+ return classes[type] || classes.success;
+ }
+
+ componentDidMount() {
+ this.timer = setTimeout(
+ this.props.onClose,
+ this.props.timeout
+ );
+ }
+
+ componentWillUnmount() {
+ clearTimeout(this.timer);
+ }
+
+ render() {
+ const message = this.props.message;
+ const alertClassName =
+ `alert
+ ${this.alertClass(message.type)}
+ alert-dismissable
+ alert-floating
+ fade in`;
+ const glyphiconClassName =
+ `glyphicon
+ ${this.glyphiconClass(message.type)}`;
+
+ return(
+
+
+
+
+ {message.text}
+
+
+ );
+ }
+}
+
+Alert.propTypes = {
+ onClose: PropTypes.func,
+ timeout: PropTypes.number,
+ message: PropTypes.shape({
+ id: PropTypes.number,
+ type: PropTypes.string.isRequired,
+ text: PropTypes.string.isRequired
+ }).isRequired
+};
+
+Alert.defaultProps = {
+ onClose: null,
+ timeout: 3000
+};
+
+export default Alert;
\ No newline at end of file
diff --git a/app/javascript/src/components/FlashMessages/index.jsx b/app/javascript/src/components/FlashMessages/index.jsx
new file mode 100644
index 000000000..ce4064156
--- /dev/null
+++ b/app/javascript/src/components/FlashMessages/index.jsx
@@ -0,0 +1,39 @@
+import React, { Component } from "react";
+import PropTypes from "prop-types";
+import Alert from "./components/Alert";
+
+class FlashMessages extends Component {
+
+ constructor(props) {
+ super(props);
+ this.state = {
+ messages: props.messages
+ };
+ }
+
+ render () {
+ return(
+
+ {this.state.messages.map(message =>
+
)
+ }
+
+ );
+ }
+}
+
+FlashMessages.propTypes = {
+ messages: PropTypes.arrayOf(
+ PropTypes.shape({
+ id: PropTypes.number.isRequired,
+ type: PropTypes.string.isRequired,
+ text: PropTypes.string.isRequired
+ })
+ )
+};
+
+FlashMessages.defaultProps = {
+ messages: []
+}
+
+export default FlashMessages;
\ No newline at end of file