Files
DefinitelyTyped/types/react-toastr/index.d.ts
DanRegazzi 9de8070a6b Update type react-toastr: Allow JSX to be used for title and message content. (#24910)
* 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.
2018-04-16 15:13:56 -07:00

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;