From 32f076cc1a6b1223a1457c3a5a6db3ecbec025e3 Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 3 Feb 2024 00:37:00 +0800 Subject: [PATCH] fix: set image view max-w Signed-off-by: Innei --- src/components/ui/editor/Milkdown/plugins/Image.tsx | 6 +++++- src/components/ui/image/ZoomedImage.tsx | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/ui/editor/Milkdown/plugins/Image.tsx b/src/components/ui/editor/Milkdown/plugins/Image.tsx index cb744b6f1d..cfd66d2889 100644 --- a/src/components/ui/editor/Milkdown/plugins/Image.tsx +++ b/src/components/ui/editor/Milkdown/plugins/Image.tsx @@ -61,7 +61,11 @@ const Image = () => { return (
- +
= ({ placeholder, height, width, + className, }) => { const [zoomer_] = useState(() => { if (isServerSide) return null! @@ -134,7 +136,7 @@ export const ImageLazy: Component = ({ onError={() => setImageLoadStatusSafe(ImageLoadStatus.Error)} className={styles({ status: imageLoadStatus, - className: imageStyles[ImageLoadStatus.Loaded], + className: clsx(imageStyles[ImageLoadStatus.Loaded], className), })} onAnimationEnd={(e: Event) => { if (ImageLoadStatus.Loaded) {