mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-10 02:55:41 +00:00
6f7e3c27e2
* Fix location query * Remove unnecessary polyfill * Fix tslint error & update history types * Parse search str using Node Query String * Revert "Parse search str using Node Query String" This reverts commit 0a482dabf29c3fbcbfd3112b974d6b98c14dca2e. * fix formatting * Add query-string * Rename App container to TabSection & pass it location prop * Add react-router withRouter HOC to NavigationLink * various adjustments/finalizations * Add location to props interface
37 lines
944 B
TypeScript
37 lines
944 B
TypeScript
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<Props, {}> {
|
|
public render() {
|
|
const { msg, level } = this.props.notification;
|
|
const notifClass = classnames({
|
|
Notification: true,
|
|
alert: true,
|
|
[`alert-${level}`]: !!level
|
|
});
|
|
|
|
return (
|
|
<div className={notifClass} role="alert" aria-live="assertive">
|
|
<span className="sr-only">{level}</span>
|
|
<div className="Notification-message">{msg}</div>
|
|
<button
|
|
className="Notification-close"
|
|
aria-label="dismiss"
|
|
onClick={this.onClose}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
public onClose = () => {
|
|
this.props.onClose(this.props.notification);
|
|
};
|
|
}
|