1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 16:48:04 +02:00
onion/js/components/header_notification_debug.js
2015-07-08 15:00:11 +02:00

29 lines
825 B
JavaScript

'use strict';
import React from 'react';
import GlobalNotificationModel from '../models/global_notification_model';
import GlobalNotificationActions from '../actions/global_notification_actions';
import MenuItem from 'react-bootstrap/lib/MenuItem';
/*
This components purpose is to be inserted into the page's navigation in order
debug the globalnotificationsaction easily
*/
let HeaderNotificationDebug = React.createClass({
triggerNotification() {
let notification = new GlobalNotificationModel('this is a test, please ignore', 'success');
GlobalNotificationActions.appendGlobalNotification(notification);
},
render() {
return (
<MenuItem onClick={this.triggerNotification}>Notification</MenuItem>
);
}
});
export default HeaderNotificationDebug;