>;
-
-export type StackConfig =
- | boolean
- | {
- /**
- * When number is greater than threshold, notifications will be stacked together.
- * @default 3
- */
- threshold?: number;
- /**
- * Offset when notifications are stacked together.
- * @default 8
- */
- offset?: number;
- /**
- * Spacing between each notification when expanded.
- */
- gap?: number;
- };
diff --git a/tests/hooks.test.tsx b/tests/hooks.test.tsx
index 42a372e..8313514 100644
--- a/tests/hooks.test.tsx
+++ b/tests/hooks.test.tsx
@@ -42,7 +42,7 @@ describe('Notification.Hooks', () => {
onClick={() => {
api.open({
duration: 0.1,
- content: (
+ description: (
{({ name }) => {name}
}
@@ -79,14 +79,14 @@ describe('Notification.Hooks', () => {
api.open({
key: 'little',
duration: 1000,
- content: light
,
+ description: light
,
});
setTimeout(() => {
api.open({
key: 'little',
duration: 1000,
- content: bamboo
,
+ description: bamboo
,
});
}, 500);
}}
@@ -116,7 +116,7 @@ describe('Notification.Hooks', () => {
act(() => {
instance.open({
- content: ,
+ description: ,
});
});
@@ -130,7 +130,7 @@ describe('Notification.Hooks', () => {
// Can be override
act(() => {
instance.open({
- content: ,
+ description: ,
duration: 1,
});
});
@@ -143,7 +143,7 @@ describe('Notification.Hooks', () => {
// Can be undefined
act(() => {
instance.open({
- content: ,
+ description: ,
duration: undefined,
});
});
@@ -172,7 +172,7 @@ describe('Notification.Hooks', () => {
act(() => {
instance.open({
- content: ,
+ description: ,
style: { color: 'red' },
className: 'custom-notice',
});
diff --git a/tests/index.test.tsx b/tests/index.test.tsx
index 6b47858..1a48e64 100644
--- a/tests/index.test.tsx
+++ b/tests/index.test.tsx
@@ -1,8 +1,8 @@
import { fireEvent, render } from '@testing-library/react';
import React from 'react';
import { act } from 'react-dom/test-utils';
-import type { NotificationAPI, NotificationConfig } from '../src';
-import { useNotification } from '../src';
+import type { NotificationAPI, NotificationConfig, NotificationProgressProps } from '../src';
+import { Notification, useNotification } from '../src';
require('../assets/index.less');
@@ -37,7 +37,7 @@ describe('Notification.Basic', () => {
act(() => {
instance.open({
- content: 1
,
+ description: 1
,
duration: 0.1,
});
});
@@ -56,7 +56,7 @@ describe('Notification.Basic', () => {
act(() => {
instance.open({
- content: 1
,
+ description: 1
,
closable: {
closeIcon: test-close-icon,
},
@@ -73,13 +73,13 @@ describe('Notification.Basic', () => {
act(() => {
instance.open({
- content: 1
,
+ description: 1
,
duration: 0.1,
});
});
act(() => {
instance.open({
- content: 2
,
+ description: 2
,
duration: 0.1,
});
});
@@ -97,7 +97,7 @@ describe('Notification.Basic', () => {
act(() => {
instance.open({
- content: (
+ description: (
222222
@@ -126,7 +126,7 @@ describe('Notification.Basic', () => {
act(() => {
instance.open({
- content: (
+ description: (
222222
@@ -154,7 +154,7 @@ describe('Notification.Basic', () => {
act(() => {
instance.open({
- content: (
+ description: (