AnimateSharedLayout.mjs 590 B

123456789101112131415
  1. import { jsx } from 'react/jsx-runtime';
  2. import { invariant } from 'motion-utils';
  3. import * as React from 'react';
  4. import { useConstant } from '../utils/use-constant.mjs';
  5. import { LayoutGroup } from './LayoutGroup/index.mjs';
  6. let id = 0;
  7. const AnimateSharedLayout = ({ children }) => {
  8. React.useEffect(() => {
  9. invariant(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
  10. }, []);
  11. return (jsx(LayoutGroup, { id: useConstant(() => `asl-${id++}`), children: children }));
  12. };
  13. export { AnimateSharedLayout };