Skip to content

feat(react-motions): add createTransition() factory #29839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 16, 2023

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Nov 14, 2023

New Behavior

Adds createTransition() factory to animate transitions (in/out) using motion atoms defined for Web Animations API.

Usage

import { createTransition, transitions } from '@fluentui/react-motions-preview'

const Fade = createTransition(transitions.fade.slow());

function App() {
  const [visible, setVisible] = React.useState(false);

  return (
    <Fade visible={visible}>
      <div />
    </Fade>
  )
}

Related Issue(s)

Related to #29821.

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 14, 2023

📊 Bundle size report

🤖 This report was generated against 8cb0e0373f04d3130354a1c4d0993260816b6ef9

Copy link

codesandbox-ci bot commented Nov 14, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b35d268:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

Copy link

size-auditor bot commented Nov 14, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: abb2dc5195c3e36c0f80e1a7fd4a7ebbdcb01f10 (build)

@layershifter layershifter marked this pull request as ready for review November 15, 2023 15:03
@layershifter layershifter requested a review from a team as a code owner November 15, 2023 15:03
@layershifter layershifter force-pushed the feat/motion-transition branch from c436d7a to 97bd356 Compare November 15, 2023 15:11
@layershifter layershifter force-pushed the feat/motion-transition branch from 97bd356 to c8e5912 Compare November 16, 2023 09:21
@layershifter layershifter enabled auto-merge (squash) November 16, 2023 11:16
@layershifter layershifter merged commit 0f56cc9 into microsoft:master Nov 16, 2023
@layershifter layershifter deleted the feat/motion-transition branch November 16, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants