mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-04 20:54:36 +00:00
* Updated the typings to allow JSX elements in addition to strings for the toast message content. Refer to https://tomchentw.github.io/react-toastr/ * Update version number of react-toastr type definition. * Revert version number to match toastr's version number Change toast notify functions to use string or ReactNode types explicitly Revert change to options override type * ReactNode includes string.
21 lines
955 B
TypeScript
21 lines
955 B
TypeScript
// Type definitions for react-toastr 3.0
|
|
// Project: https://github.com/tomchentw/react-toastr
|
|
// Definitions by: Josh Holmer <https://github.com/shssoichiro>, Dan Regazzi <https://github.com/DanRegazzi>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.6
|
|
|
|
import { Component, ReactHTML } from 'react';
|
|
|
|
export class ToastContainer extends Component<{
|
|
toastMessageFactory: any;
|
|
className?: string;
|
|
}> {
|
|
error: (message: React.ReactNode, title: React.ReactNode, optionsOverride?: {}) => void;
|
|
info: (message: React.ReactNode, title: React.ReactNode, optionsOverride?: {}) => void;
|
|
success: (message: React.ReactNode, title: React.ReactNode, optionsOverride?: {}) => void;
|
|
warning: (message: React.ReactNode, title: React.ReactNode, optionsOverride?: {}) => void;
|
|
clear: () => void;
|
|
}
|
|
export const ToastMessageAnimated: keyof ReactHTML;
|
|
export const ToastMessagejQuery: keyof ReactHTML;
|