|
|
|
@ -8,6 +8,7 @@ import { connect } from 'react-redux';
|
|
|
|
|
import * as NOTIFICATION from '~/js/actions/constants/notification';
|
|
|
|
|
import * as NotificationActions from '~/js/actions/NotificationActions';
|
|
|
|
|
import type { Action, State, Dispatch } from '~/flowtype';
|
|
|
|
|
import Loader from './LoaderCircle';
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
notifications: $ElementType<State, 'notifications'>,
|
|
|
|
@ -21,7 +22,8 @@ type NProps = {
|
|
|
|
|
title: string;
|
|
|
|
|
message?: string;
|
|
|
|
|
actions?: Array<any>;
|
|
|
|
|
close?: typeof NotificationActions.close
|
|
|
|
|
close?: typeof NotificationActions.close,
|
|
|
|
|
loading?: boolean
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const Notification = (props: NProps): React$Element<string> => {
|
|
|
|
@ -48,6 +50,11 @@ export const Notification = (props: NProps): React$Element<string> => {
|
|
|
|
|
{ actionButtons }
|
|
|
|
|
</div>
|
|
|
|
|
) : null }
|
|
|
|
|
{ props.loading ? (
|
|
|
|
|
<Loader
|
|
|
|
|
className="info"
|
|
|
|
|
size="50" />
|
|
|
|
|
) : null }
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|