From adf214d3a672e3cfcf6b5ba0df05549f5ca73dd1 Mon Sep 17 00:00:00 2001 From: Juli Ovechkina Date: Fri, 6 Oct 2023 14:02:27 +0100 Subject: [PATCH] feat(Tabs): add image variative height for media (#612) --- src/blocks/Tabs/Tabs.tsx | 3 ++- src/blocks/Tabs/__stories__/data.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/blocks/Tabs/Tabs.tsx b/src/blocks/Tabs/Tabs.tsx index 8ac8db90f..e990cd8ab 100644 --- a/src/blocks/Tabs/Tabs.tsx +++ b/src/blocks/Tabs/Tabs.tsx @@ -90,7 +90,8 @@ export const TabsBlock = ({ key={activeTab} className={b('media')} playVideo={play} - height={mediaHeight} + height={activeTabData.media?.video && mediaHeight} + imageClassName={b('image')} /> )} diff --git a/src/blocks/Tabs/__stories__/data.json b/src/blocks/Tabs/__stories__/data.json index f78d6cc4f..3e8f8cea8 100644 --- a/src/blocks/Tabs/__stories__/data.json +++ b/src/blocks/Tabs/__stories__/data.json @@ -42,7 +42,7 @@ "start": 0 } }, - "image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_white.png" + "previewImage": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_white.png" }, "dark": { "video": { @@ -55,7 +55,7 @@ "start": 0 } }, - "image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_dark.png" + "previewImage": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_dark.png" } }, "caption": "Dolor sit amet",