From 692ae73cf05c69b5915bb220d242bff292cfc60f Mon Sep 17 00:00:00 2001 From: RedrockJS Date: Mon, 15 Dec 2025 13:32:42 +0300 Subject: [PATCH] fix: add preview in contacts page --- .idea/workspace.xml | 28 ++--------- .../licence-slider/styles.module.scss | 48 +++++++++++++++++++ src/feature/contacts/licence-slider/ui.tsx | 21 +++++++- 3 files changed, 72 insertions(+), 25 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index bdc3acb..d301f34 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,29 +5,9 @@ - - - - - - - - - - - - - - - - - - - - - - + + - @@ -154,7 +134,7 @@ - + diff --git a/src/feature/contacts/licence-slider/styles.module.scss b/src/feature/contacts/licence-slider/styles.module.scss index 8fc6992..51b78a4 100644 --- a/src/feature/contacts/licence-slider/styles.module.scss +++ b/src/feature/contacts/licence-slider/styles.module.scss @@ -6,6 +6,7 @@ display: flex; justify-content: center; align-items: center; + cursor: pointer; .Image { width: rem(200px); @@ -13,3 +14,50 @@ } } } + + +.PreviewModalContainer { + background: $color-white; + width: max-content; + height: auto; + border-radius: rem(16px); + padding: rem(10px) rem(10px); + margin-bottom: rem(20px); + display: flex; + flex-direction: column; + //max-width: max-content;//rem(460px); + justify-content: center; + align-self: center; + overflow: visible; + + @include iftablet{ + max-width: unset; + align-self: unset; + width: max-content; + height: auto; + } + + .Image{ + object-fit: contain; + width: 80vw; + height: auto; + max-height: 90vh; + @include iftablet{ + width: auto; + height: 90vh; + } + } + + & > svg { + z-index: 1; + top: rem(5px); + right: rem(-25px); + @include iftablet{ + right: rem(-40px); + } + path { + stroke: #FFFFFF; + stroke-opacity: 1; + } + } +} \ No newline at end of file diff --git a/src/feature/contacts/licence-slider/ui.tsx b/src/feature/contacts/licence-slider/ui.tsx index 766d5d9..30bc7fa 100644 --- a/src/feature/contacts/licence-slider/ui.tsx +++ b/src/feature/contacts/licence-slider/ui.tsx @@ -9,6 +9,8 @@ import s from './styles.module.scss'; import Image, { StaticImageData } from 'next/image'; import { Swiper, SwiperSlide } from 'swiper/react'; import { Autoplay, Grid } from 'swiper/modules'; +import { useModal } from '@core/providers/modal-provider'; +import { Preview } from '@/widgets'; type LicenseSliderProps = { slidesData: { @@ -38,6 +40,17 @@ const swiperBreakpoints = { }; function LicenceSlider({ slidesData }: LicenseSliderProps) { + const modal = useModal(); + + const openPreviewModal = + ({ image, name }: { image: StaticImageData; name: string }) => + () => + modal.showModal( + + {name} + , + ); + return ( {slidesData.map(({ id, name, image }) => ( - {name} + {name} ))}