Skip to content

Commit 2ea149b

Browse files
committed
refactor: move src to legacy and create re-export index for compatibility
1 parent 477e95f commit 2ea149b

9 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import useNotification from './hooks/useNotification';
2-
import Notice from './Notice';
3-
import type { NotificationAPI, NotificationConfig } from './hooks/useNotification';
4-
import NotificationProvider from './NotificationProvider';
1+
import useNotification from './legacy/hooks/useNotification';
2+
import Notice from './legacy/Notice';
3+
import type { NotificationAPI, NotificationConfig } from './legacy/hooks/useNotification';
4+
import NotificationProvider from './legacy/NotificationProvider';
55

66
export { useNotification, Notice, NotificationProvider };
77
export type { NotificationAPI, NotificationConfig };
File renamed without changes.

tests/hooks.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, { ReactElement } from 'react';
22
import { render, fireEvent, act } from '@testing-library/react';
3-
import { useNotification } from '../src';
3+
import { useNotification, NotificationProvider } from '../src';
44
import type { NotificationAPI, NotificationConfig } from '../src';
5-
import NotificationProvider from '../src/NotificationProvider';
65

76
require('../assets/index.less');
87

0 commit comments

Comments
 (0)