From 1d56d5548703997bbd00774fbef5b539afdc01ec Mon Sep 17 00:00:00 2001 From: or-else Date: Tue, 24 Sep 2019 19:40:36 +0300 Subject: [PATCH] adding alert component --- src/widgets/alert.jsx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/widgets/alert.jsx diff --git a/src/widgets/alert.jsx b/src/widgets/alert.jsx new file mode 100644 index 00000000..23678a65 --- /dev/null +++ b/src/widgets/alert.jsx @@ -0,0 +1,28 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; + +export default class Alert extends React.PureComponent { + render() { + return this.props.visible ? +
+
+
{this.props.title}
+
{this.props.content}
+
+ {this.props.onReject ? + + : + null + } + +
+
+
+ : + null; + } +};