Skip to content

Commit e6b51a6

Browse files
committed
chore: fix lint
1 parent 3c465b4 commit e6b51a6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Diff for: src/Dialog/Content/index.tsx

+9-8
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import CSSMotion from '@rc-component/motion';
55
import { offset } from '../../util';
66
import type { PanelProps, PanelRef } from './Panel';
77
import Panel from './Panel';
8+
import type { CSSMotionRef } from '@rc-component/motion/es/CSSMotion';
89

9-
export type ContentRef = PanelRef & {
10-
inMotion: () => boolean;
11-
enableMotion: () => boolean;
12-
};
10+
export type CSSMotionStateRef = Pick<CSSMotionRef, 'inMotion' | 'enableMotion'>;
11+
12+
export type ContentRef = PanelRef & CSSMotionStateRef;
1313

1414
export type ContentProps = {
1515
motionName: string;
@@ -32,10 +32,11 @@ const Content = React.forwardRef<ContentRef, ContentProps>((props, ref) => {
3232
mousePosition,
3333
} = props;
3434

35-
const dialogRef = useRef<{
36-
nativeElement: HTMLDivElement;
37-
inMotion: () => boolean;
38-
}>();
35+
const dialogRef = useRef<
36+
{
37+
nativeElement: HTMLElement;
38+
} & CSSMotionStateRef
39+
>();
3940

4041
const panelRef = useRef<PanelRef>();
4142

0 commit comments

Comments
 (0)