diff --git a/src/components/Notification/index.js b/src/components/Notification/index.js index a5948548..eb5e6e4b 100644 --- a/src/components/Notification/index.js +++ b/src/components/Notification/index.js @@ -98,6 +98,28 @@ export const Notification = (props: NProps): React$Element => { return color; }; + const getIconColor = (type) => { + let color; + switch (type) { + case 'info': + color = colors.INFO_PRIMARY; + break; + case 'error': + color = colors.ERROR_PRIMARY; + break; + case 'warning': + color = colors.WARNING_PRIMARY; + break; + case 'success': + color = colors.SUCCESS_PRIMARY; + break; + default: + color = null; + } + + return color; + }; + return ( {props.loading && } @@ -108,7 +130,10 @@ export const Notification = (props: NProps): React$Element => { )} - + { props.title } @@ -136,7 +161,7 @@ export const Notification = (props: NProps): React$Element => { ); }; -export const NotificationGroup = (props: Props) => { +export const NotificationGroup = (props) => { const { notifications, close } = props; return notifications.map((n, i) => ( { }; export default connect( - (state: State) => ({ + state => ({ notifications: state.notifications, }), - (dispatch: Dispatch) => ({ + dispatch => ({ close: bindActionCreators(NotificationActions.close, dispatch), }), )(NotificationGroup); \ No newline at end of file