mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 12:16:38 +08:00
23 lines
542 B
TypeScript
23 lines
542 B
TypeScript
import * as React from 'react';
|
|
import { ToastContainer, ToastMessageAnimated } from 'react-toastr';
|
|
|
|
const toastMessageFactory = React.createFactory(ToastMessageAnimated);
|
|
|
|
class Test extends React.Component {
|
|
ref: ToastContainer;
|
|
|
|
toastRef = (ref: ToastContainer) => {
|
|
this.ref = ref;
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<ToastContainer
|
|
ref={this.toastRef}
|
|
toastMessageFactory={toastMessageFactory}
|
|
className="toast-top-right"
|
|
/>
|
|
);
|
|
}
|
|
}
|