import { Notification } from 'actions/notifications'; import classnames from 'classnames'; import React, { Component } from 'react'; import './Notifications.scss'; interface Props { notification: Notification; onClose(n: Notification): void; } export default class NotificationRow extends Component { public render() { const { msg, level } = this.props.notification; const notifClass = classnames({ Notification: true, alert: true, [`alert-${level}`]: !!level }); return (
{level}
{msg}
); } public onClose = () => { this.props.onClose(this.props.notification); }; }