mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-28 17:35:49 +08:00
Add JSX Elements support (#29438)
Allow JSX Elements as added types for title/message properties of the Notification interface. This will allow custom html tags like spans and divs with more control over the notifications' appearance, as is possible in the js module.
This commit is contained in:
4
types/react-notification-system/index.d.ts
vendored
4
types/react-notification-system/index.d.ts
vendored
@@ -18,8 +18,8 @@ declare namespace NotificationSystem {
|
||||
export type CallBackFunction = (notification: Notification) => void;
|
||||
|
||||
export interface Notification {
|
||||
title?: string;
|
||||
message?: string;
|
||||
title?: string | JSX.Element;
|
||||
message?: string | JSX.Element;
|
||||
level?: "error" | "warning" | "info" | "success";
|
||||
position?: "tr" | "tl" | "tc" | "br" | "bl" | "bc";
|
||||
autoDismiss?: number;
|
||||
|
||||
Reference in New Issue
Block a user