From c0fd8cf1d8cc82d7d1fc37fec6dd09cd8a6da5d2 Mon Sep 17 00:00:00 2001 From: Anna Date: Fri, 15 Nov 2024 11:53:12 +0300 Subject: [PATCH] feat: add single type image to gallery component --- packages/gallery/src/Component.tsx | 3 +- .../src/components/image-viewer/component.tsx | 11 +- .../components/image-viewer/index.module.css | 7 +- .../image-viewer/single-image-viewer.tsx | 119 ++++++++++++++++++ .../src/components/image-viewer/slide.tsx | 14 +-- 5 files changed, 138 insertions(+), 16 deletions(-) create mode 100644 packages/gallery/src/components/image-viewer/single-image-viewer.tsx diff --git a/packages/gallery/src/Component.tsx b/packages/gallery/src/Component.tsx index 3a83933dff..1c8f23177e 100644 --- a/packages/gallery/src/Component.tsx +++ b/packages/gallery/src/Component.tsx @@ -5,6 +5,7 @@ import SwiperCore from 'swiper'; import { BaseModal } from '@alfalab/core-components-base-modal'; import { useMedia } from '@alfalab/hooks'; +import { SingleImageViewer } from './components/image-viewer/single-image-viewer'; import { Header, HeaderMobile, ImageViewer, InfoBar, NavigationBar } from './components'; import { GalleryContext } from './context'; import { GalleryImage, ImageMeta } from './types'; @@ -242,7 +243,7 @@ export const Gallery: FC = ({ >
{view === 'desktop' ?
: } - + {images.length === 1 ? : }