Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 36c8a4c

Browse files
committed
fix: types
1 parent d927c39 commit 36c8a4c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

@types/cherry.d.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ declare class Space extends React.Component<SpaceProps, any> {}
4141

4242
declare class TableOverflow extends React.Component<TableOverflowProps, any> {}
4343

44-
declare class TableOverflow extends React.Component<TableOverflowProps, any> {}
4544

4645
declare class ToastNotificationsProvider extends React.Component<
4746
any,
@@ -53,10 +52,7 @@ declare class ToastNotifications extends React.Component<
5352
any
5453
> {}
5554

56-
declare class ToastNotificationsContext extends React.Component<
57-
ToastNotificationsContextProps,
58-
any
59-
> {}
55+
const ToastNotificationsContext = React.createContext<ToastNotificationsContextProps | null>(null);
6056

6157
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6258
children?: React.ReactNode;
@@ -264,11 +260,18 @@ interface TableOverflowProps {
264260
children?: React.ReactNode;
265261
}
266262

263+
interface ToastNotificationProps {
264+
text: string;
265+
status: "hidden" | "visible";
266+
color: string;
267+
autoHide: number;
268+
}
269+
267270
interface ToastNotificationsContextProps {
268-
notifications: any;
271+
notifications?: ToastNotificationProps[];
269272
addNotification: (
270273
text: string,
271-
object: {
274+
config?: {
272275
autoHide?: number;
273276
color?: "info" | "error" | "success" | "warning";
274277
},

0 commit comments

Comments
 (0)