Skip to content

Commit

Permalink
chore: Export ts define
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Sep 2, 2020
1 parent 3a88bf5 commit 87123fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/CSSMotion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { getTransitionName, supportTransition } from './util/motion';
import {
MotionStatus,
STATUS_NONE,
MotionEvent,
MotionEventHandler,
MotionEndEventHandler,
} from './interface';
import useStatus from './hooks/useStatus';
import DomWrapper from './DomWrapper';
Expand All @@ -22,11 +22,6 @@ export type CSSMotionConfig =
forwardRef?: boolean;
};

export type MotionEndEventHandler = (
element: HTMLElement,
event: MotionEvent,
) => boolean | void;

export type MotionName =
| string
| {
Expand Down
9 changes: 8 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import CSSMotion, { CSSMotionProps } from './CSSMotion';
import CSSMotionList, { CSSMotionListProps } from './CSSMotionList';
import { MotionEventHandler, MotionEndEventHandler } from './interface';

export { CSSMotionProps, CSSMotionList, CSSMotionListProps };
export {
CSSMotionProps,
CSSMotionList,
CSSMotionListProps,
MotionEventHandler,
MotionEndEventHandler,
};

export default CSSMotion;
5 changes: 5 additions & 0 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ export type MotionEventHandler = (
element: HTMLElement,
event: MotionEvent,
) => React.CSSProperties | void;

export type MotionEndEventHandler = (
element: HTMLElement,
event: MotionEvent,
) => boolean | void;

0 comments on commit 87123fe

Please sign in to comment.