mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
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.
This commit is contained in:
committed by
Ryan Cavanaugh
parent
b3cea7a6bb
commit
9de8070a6b
10
types/react-toastr/index.d.ts
vendored
10
types/react-toastr/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for react-toastr 3.0
|
||||
// Project: https://github.com/tomchentw/react-toastr
|
||||
// Definitions by: Josh Holmer <https://github.com/shssoichiro>
|
||||
// Definitions by: Josh Holmer <https://github.com/shssoichiro>, Dan Regazzi <https://github.com/DanRegazzi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
@@ -10,10 +10,10 @@ export class ToastContainer extends Component<{
|
||||
toastMessageFactory: any;
|
||||
className?: string;
|
||||
}> {
|
||||
error: (message: string, title: string, optionsOverride?: {}) => void;
|
||||
info: (message: string, title: string, optionsOverride?: {}) => void;
|
||||
success: (message: string, title: string, optionsOverride?: {}) => void;
|
||||
warning: (message: string, title: string, optionsOverride?: {}) => void;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user