From 682b716157a0f5ccd357669f24df3173d0c6f903 Mon Sep 17 00:00:00 2001 From: Sanchitv3 Date: Tue, 14 Jan 2025 13:38:40 +0530 Subject: [PATCH 1/4] fix: closebuttonicon bg on hover and updated example --- packages/unstyled/image-viewer/CHANGELOG.md | 6 ++++++ packages/unstyled/image-viewer/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/unstyled/image-viewer/CHANGELOG.md b/packages/unstyled/image-viewer/CHANGELOG.md index 9c38cc2fe..60c4834dc 100644 --- a/packages/unstyled/image-viewer/CHANGELOG.md +++ b/packages/unstyled/image-viewer/CHANGELOG.md @@ -1,5 +1,11 @@ # @gluestack-ui/image-viewer +## 0.0.9 + +### Patch Changes + +- fix: closebuttonicon bg on hover and updated example + ## 0.0.8 ### Patch Changes diff --git a/packages/unstyled/image-viewer/package.json b/packages/unstyled/image-viewer/package.json index 23718dbc0..327c41fdc 100644 --- a/packages/unstyled/image-viewer/package.json +++ b/packages/unstyled/image-viewer/package.json @@ -1,6 +1,6 @@ { "name": "@gluestack-ui/image-viewer", - "version": "0.0.8", + "version": "0.0.9", "main": "lib/index", "module": "lib/index", "types": "lib/index.d.ts", From ace7b7f531ecc9df00e1e93a44eaab8269276bf6 Mon Sep 17 00:00:00 2001 From: Sanchitv3 Date: Tue, 14 Jan 2025 15:02:44 +0530 Subject: [PATCH 2/4] fix: updated hover state of close button --- .../src/core-components/nativewind/image-viewer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/storybook-nativewind/src/core-components/nativewind/image-viewer/index.tsx b/example/storybook-nativewind/src/core-components/nativewind/image-viewer/index.tsx index 7179b1027..6169bf6d4 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/image-viewer/index.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/image-viewer/index.tsx @@ -28,7 +28,7 @@ const BackdropStyle = tva({ }); const CloseButtonStyle = tva({ - base: 'absolute top-4 right-4 z-10 rounded-full w-8 h-8 justify-center items-center cursor-pointer hover:bg-primary-500 transition-all duration-300', + base: 'absolute top-4 right-4 z-10 rounded-full w-8 h-8 justify-center items-center cursor-pointer data-[hover=true]:bg-primary-500 transition-all duration-300', }); const UIImageViewer = createImageViewer({ From 78dc021be58073e8e63d7295b79f7fc4253db94a Mon Sep 17 00:00:00 2001 From: Sanchitv3 Date: Tue, 14 Jan 2025 15:03:39 +0530 Subject: [PATCH 3/4] fix: updated scaleValue for onClose --- packages/unstyled/image-viewer/src/ImageViewerContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/unstyled/image-viewer/src/ImageViewerContent.tsx b/packages/unstyled/image-viewer/src/ImageViewerContent.tsx index 1a9e9bbc7..c4e2237d6 100644 --- a/packages/unstyled/image-viewer/src/ImageViewerContent.tsx +++ b/packages/unstyled/image-viewer/src/ImageViewerContent.tsx @@ -111,7 +111,7 @@ const ImageViewerContent = ( }) .onEnd((event: any) => { if (scale.value <= 1) { - if (Math.abs(event.translationY) > SCREEN_HEIGHT * 0.005) { + if (Math.abs(event.translationY) > SCREEN_HEIGHT * 0.03) { runOnJS(onClose)(); } } From 44fcd536d8a9ea29974415f8dd3fd6185c8752b6 Mon Sep 17 00:00:00 2001 From: Sanchit Kumar Date: Tue, 14 Jan 2025 15:30:57 +0530 Subject: [PATCH 4/4] Update CHANGELOG.md --- packages/unstyled/image-viewer/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/unstyled/image-viewer/CHANGELOG.md b/packages/unstyled/image-viewer/CHANGELOG.md index 60c4834dc..eeff52b14 100644 --- a/packages/unstyled/image-viewer/CHANGELOG.md +++ b/packages/unstyled/image-viewer/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- fix: closebuttonicon bg on hover and updated example +- fix: changed translateY breakpoint for onClose ## 0.0.8