diff --git a/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.stories.tsx b/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.stories.tsx index 2cba64f3d..609640b41 100644 --- a/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.stories.tsx +++ b/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.stories.tsx @@ -11,7 +11,12 @@ const ImageViewerMeta: ComponentMeta = { }, argTypes: {}, args: { - images: [{ id: 1, url: 'https://picsum.photos/1000/1000' }], + images: [ + { + id: 1, + url: 'https://img.freepik.com/free-photo/young-boy-learning-how-ride-horse_23-2150460636.jpg', + }, + ], }, }; diff --git a/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.tsx b/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.tsx index 439d30fcd..7c40983ef 100644 --- a/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.tsx +++ b/example/storybook-nativewind/src/components/ImageViewer/ImageViewer.tsx @@ -11,9 +11,11 @@ import { Icon, CloseIcon } from '@/components/ui/icon'; const ImageViewerBasic = ({ ...props }: any) => { const Images = [ - { id: 1, url: 'https://picsum.photos/1000/1000', title: 'Image 1' }, - { id: 2, url: 'https://picsum.photos/1000/1000', title: 'Image 2' }, - { id: 3, url: 'https://picsum.photos/1000/1000', title: 'Image 3' }, + { + id: 1, + url: 'https://img.freepik.com/free-photo/young-boy-learning-how-ride-horse_23-2150460636.jpg', + title: 'Image 1', + }, ]; const [visible, setVisible] = useState(false); return ( @@ -22,7 +24,7 @@ const ImageViewerBasic = ({ ...props }: any) => { @@ -40,7 +42,7 @@ const ImageViewerBasic = ({ ...props }: any) => { keyExtractor={(item, index) => item.id + '-' + index} > - + diff --git a/example/storybook-nativewind/src/components/ImageViewer/index.nw.stories.mdx b/example/storybook-nativewind/src/components/ImageViewer/index.nw.stories.mdx index 5a24ee157..fd82d3e5b 100644 --- a/example/storybook-nativewind/src/components/ImageViewer/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/ImageViewer/index.nw.stories.mdx @@ -52,19 +52,19 @@ This is an illustration of **ImageViewer** component. px: '$8', }} showComponentRenderer={true} - showArgsController={true} + showArgsController={false} metaData={{ code: ` function App() { const [visible, setVisible] = React.useState(false); - const Images = [{ id: 1, url: 'https://picsum.photos/1000/1000' }]; + const Images = [{ id: 1, url: 'https://img.freepik.com/free-photo/young-boy-learning-how-ride-horse_23-2150460636.jpg' }]; return (
setVisible(true)}> setVisible(false)}> @@ -77,7 +77,7 @@ This is an illustration of **ImageViewer** component. keyExtractor={(item, index) => item.id + '-' + index} > - + @@ -369,19 +369,19 @@ import { Center } from '@/components/ui/center'; px: '$8', }} showComponentRenderer={true} - showArgsController={true} + showArgsController={false} metaData={{ code: ` function App() { const [visible, setVisible] = React.useState(false); - const Images = [{ id: 1, url: 'https://picsum.photos/1000/1000' }]; + const Images = [{ id: 1, url: 'https://img.freepik.com/free-photo/young-boy-learning-how-ride-horse_23-2150460636.jpg' }]; return (
setVisible(true)}> setVisible(false)}> @@ -394,7 +394,7 @@ import { Center } from '@/components/ui/center'; keyExtractor={(item, index) => item.id + '-' + index} > - + 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 fd17523ef..7179b1027 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 bg-white rounded-full w-8 h-8 justify-center items-center cursor-pointer', + 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', }); const UIImageViewer = createImageViewer({ diff --git a/packages/unstyled/image-viewer/src/ImageViewerContent.tsx b/packages/unstyled/image-viewer/src/ImageViewerContent.tsx index 2b07e06a8..1a9e9bbc7 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.2) { + if (Math.abs(event.translationY) > SCREEN_HEIGHT * 0.005) { runOnJS(onClose)(); } }