Skip to content

Commit ba68f3a

Browse files
authored
fix(react-motion): apply MotionComponent type to presence definition (microsoft#35952)
1 parent 1668a3c commit ba68f3a

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "fix(react-motion): apply MotionComponent type to presence definition",
4+
"packageName": "@fluentui/react-motion",
5+
"email": "robertpenner@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-motion/library/etc/react-motion.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export const motionTokens: {
132132
export type PresenceComponent<MotionParams extends Record<string, MotionParam> = {}> = React_2.FC<PresenceComponentProps & MotionParams> & {
133133
(props: PresenceComponentProps & MotionParams): JSXElement | null;
134134
[PRESENCE_MOTION_DEFINITION]: PresenceMotionFn<MotionParams>;
135-
In: React_2.FC<MotionComponentProps & MotionParams>;
136-
Out: React_2.FC<MotionComponentProps & MotionParams>;
135+
In: MotionComponent<MotionParams>;
136+
Out: MotionComponent<MotionParams>;
137137
};
138138

139139
// @public (undocumented)

packages/react-components/react-motion/library/src/factories/createPresenceComponent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {
1919
AnimationHandle,
2020
} from '../types';
2121
import { useMotionBehaviourContext } from '../contexts/MotionBehaviourContext';
22-
import { createMotionComponent, MotionComponentProps } from './createMotionComponent';
22+
import { createMotionComponent, MotionComponent } from './createMotionComponent';
2323

2424
/**
2525
* A private symbol to store the motion definition on the component for variants.
@@ -85,8 +85,8 @@ export type PresenceComponent<MotionParams extends Record<string, MotionParam> =
8585
> & {
8686
(props: PresenceComponentProps & MotionParams): JSXElement | null;
8787
[PRESENCE_MOTION_DEFINITION]: PresenceMotionFn<MotionParams>;
88-
In: React.FC<MotionComponentProps & MotionParams>;
89-
Out: React.FC<MotionComponentProps & MotionParams>;
88+
In: MotionComponent<MotionParams>;
89+
Out: MotionComponent<MotionParams>;
9090
};
9191

9292
const INTERRUPTABLE_MOTION_SYMBOL = Symbol.for('interruptablePresence');

0 commit comments

Comments
 (0)