import * as React from 'react';
import {
Provider as AlertProvider,
Alert,
withAlert,
AlertPosition,
AlertTransition,
ProviderOptions,
InjectedAlertProp
} from 'react-alert';
class AppWithoutAlert extends React.Component<{ alert: InjectedAlertProp }> {
render() {
return (
);
}
}
const App = withAlert(AppWithoutAlert);
class AppAlert extends React.Component {
render() {
return (
{alert => (
)}
);
}
}
class AlertTemplate extends React.Component {
render() {
// the style contains only the margin given as offset
// options contains all alert given options
// message is the alert message...
// close is a function that closes the alert
const { style, options, message, close } = this.props;
return (