Skip to content

Commit 87123fe

Browse files
committed
chore: Export ts define
1 parent 3a88bf5 commit 87123fe

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

src/CSSMotion.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { getTransitionName, supportTransition } from './util/motion';
88
import {
99
MotionStatus,
1010
STATUS_NONE,
11-
MotionEvent,
1211
MotionEventHandler,
12+
MotionEndEventHandler,
1313
} from './interface';
1414
import useStatus from './hooks/useStatus';
1515
import DomWrapper from './DomWrapper';
@@ -22,11 +22,6 @@ export type CSSMotionConfig =
2222
forwardRef?: boolean;
2323
};
2424

25-
export type MotionEndEventHandler = (
26-
element: HTMLElement,
27-
event: MotionEvent,
28-
) => boolean | void;
29-
3025
export type MotionName =
3126
| string
3227
| {

src/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import CSSMotion, { CSSMotionProps } from './CSSMotion';
22
import CSSMotionList, { CSSMotionListProps } from './CSSMotionList';
3+
import { MotionEventHandler, MotionEndEventHandler } from './interface';
34

4-
export { CSSMotionProps, CSSMotionList, CSSMotionListProps };
5+
export {
6+
CSSMotionProps,
7+
CSSMotionList,
8+
CSSMotionListProps,
9+
MotionEventHandler,
10+
MotionEndEventHandler,
11+
};
512

613
export default CSSMotion;

src/interface.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ export type MotionEventHandler = (
1717
element: HTMLElement,
1818
event: MotionEvent,
1919
) => React.CSSProperties | void;
20+
21+
export type MotionEndEventHandler = (
22+
element: HTMLElement,
23+
event: MotionEvent,
24+
) => boolean | void;

0 commit comments

Comments
 (0)