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

Commit 8a7fb84

Browse files
committed
feat: improve types
1 parent e42d4e1 commit 8a7fb84

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

@types/cherry.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ declare class ToastNotifications extends React.Component<
4949
> {}
5050

5151
const ToastNotificationsContext =
52-
React.createContext<ToastNotificationsContextProps | null>(null);
52+
React.createContext<ToastNotificationsContextProps>();
5353

5454
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5555
children?: React.ReactNode;
@@ -267,7 +267,7 @@ interface ToastNotificationProps {
267267
interface ToastNotificationsContextProps {
268268
notifications?: ToastNotificationProps[];
269269
addNotification: (
270-
text: string,
270+
text: React.ReactNode | string,
271271
config?: {
272272
autoHide?: number;
273273
color?: "info" | "error" | "success" | "warning";

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cherry-components",
3-
"version": "0.0.2-21",
3+
"version": "0.0.2-22",
44
"description": "Cherry React Components",
55
"main": "dist/cherry.js",
66
"module": "dist/cherry.module.js",
@@ -35,12 +35,12 @@
3535
"@emotion/eslint-plugin": "^11.10.0",
3636
"@rollup/plugin-babel": "^6.0.3",
3737
"babel-eslint": "^10.1.0",
38-
"eslint": "^8.32.0",
38+
"eslint": "^8.33.0",
3939
"eslint-plugin-prettier": "^4.2.1",
40-
"eslint-plugin-react": "^7.32.1",
40+
"eslint-plugin-react": "^7.32.2",
4141
"eslint-plugin-react-hooks": "^4.6.0",
4242
"prettier": "^2.8.3",
43-
"rollup": "^3.10.1",
43+
"rollup": "^3.12.1",
4444
"rollup-plugin-commonjs": "^10.1.0",
4545
"rollup-plugin-dts": "^5.1.1",
4646
"rollup-plugin-node-resolve": "^5.2.0",

0 commit comments

Comments
 (0)