From dc15bf75c6a696550cd0aac6272dddfb0986c787 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Wed, 25 Sep 2024 10:55:55 +0500 Subject: [PATCH] editor: fix `framer-motion` deprecation warning --- packages/editor/src/components/action-sheet/index.tsx | 2 +- packages/editor/src/extensions/image/component.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/action-sheet/index.tsx b/packages/editor/src/components/action-sheet/index.tsx index ddf6d7a14..eb67dfa0d 100644 --- a/packages/editor/src/components/action-sheet/index.tsx +++ b/packages/editor/src/components/action-sheet/index.tsx @@ -38,7 +38,7 @@ import { import { useTheme } from "@emotion/react"; import { EmotionThemeProvider, Theme } from "@notesnook/theme"; -const AnimatedFlex = motion(Flex); +const AnimatedFlex = motion.create(Flex); type ActionSheetHistoryItem = { title?: string; diff --git a/packages/editor/src/extensions/image/component.tsx b/packages/editor/src/extensions/image/component.tsx index 92fa4bcc1..9841c8299 100644 --- a/packages/editor/src/extensions/image/component.tsx +++ b/packages/editor/src/extensions/image/component.tsx @@ -43,7 +43,7 @@ import { useObserver } from "../../hooks/use-observer.js"; import { Attachment, ImageAlignmentOptions } from "../attachment/index.js"; import { DataURL } from "@notesnook/common"; -export const AnimatedImage = motion(Image); +export const AnimatedImage = motion.create(Image); export function ImageComponent( props: ReactNodeViewProps>