Skip to content

Commit

Permalink
chore: remove trailing whitespace in package.json that was failing CI
Browse files Browse the repository at this point in the history
- yarn nx format:check --base origin/master
  • Loading branch information
robertpenner committed Dec 18, 2024
1 parent aba26a0 commit 0dc7242
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@fluentui/react-icons": "^2.0.245",
"@fluentui/react-jsx-runtime": "^9.0.48",
"@fluentui/react-motion": "^9.6.4",
"@fluentui/react-motion-components-preview": "^0.4.0",
"@fluentui/react-motion-components-preview": "^0.4.0",
"@fluentui/react-shared-contexts": "^9.21.2",
"@fluentui/react-link": "^9.3.5",
"@fluentui/react-theme": "^9.1.24",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,28 @@ import { motionTokens, createPresenceComponent, PresenceDirection, AtomMotion }

// TODO: import these atoms from react-motion-components-preview once they're available there

interface FadeAtomParams {
direction: PresenceDirection;
duration: number;
easing?: string;
fromValue?: number;
}

/**
* Generates a motion atom object for a fade in or fade out.
* @param direction - The functional direction of the motion: 'enter' or 'exit'.
* @param duration - The duration of the motion in milliseconds.
* @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
* @param fromValue - The starting opacity value. Defaults to 0.
* @returns A motion atom object with opacity keyframes and the supplied duration and easing.
*/
const fadeAtom = ({
direction,
duration,
easing = motionTokens.curveLinear,
}: {
direction: PresenceDirection;
duration: number;
easing?: string;
}): AtomMotion => {
const keyframes = [{ opacity: 0 }, { opacity: 1 }];
fromValue = 0,
}: FadeAtomParams): AtomMotion => {
const keyframes = [{ opacity: fromValue }, { opacity: 1 }];
if (direction === 'exit') {
keyframes.reverse();
}
Expand Down

0 comments on commit 0dc7242

Please sign in to comment.