UNPKG

@atlaskit/motion

Version:

A set of utilities to apply motion in your application.

17 lines (16 loc) • 783 B
import React from 'react'; import { fg } from '@atlaskit/platform-feature-flags/fg'; import { defaultExitingContext, ExitingContext } from './exiting-persistence'; /** * Separates a container's presence from its content. Place inside the component * that owns the container animation, so descendants cannot complete its exit. * Restores standalone presence rather than disabling motion: explicit animations * and nested ExitingPersistence boundaries retain their own lifecycle. */ export default function MotionPresenceBoundary({ children }) { return fg('platform-dst-motion-isolate-presence') ? /*#__PURE__*/React.createElement(ExitingContext.Provider, { value: defaultExitingContext }, children) : /*#__PURE__*/React.createElement(React.Fragment, null, children); }