From 7a7abcc100b12f99cd88c2187211aa21595f8cae Mon Sep 17 00:00:00 2001 From: vineyardbovines Date: Tue, 21 Apr 2026 12:25:32 -0400 Subject: [PATCH] feat(lightbox): add ImageMenu for share/save actions --- src/features/lightbox/chrome/ImageMenu.tsx | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/features/lightbox/chrome/ImageMenu.tsx diff --git a/src/features/lightbox/chrome/ImageMenu.tsx b/src/features/lightbox/chrome/ImageMenu.tsx new file mode 100644 index 0000000000..00332d81cc --- /dev/null +++ b/src/features/lightbox/chrome/ImageMenu.tsx @@ -0,0 +1,59 @@ +import {Pressable} from 'react-native' +import {msg} from '@lingui/core/macro' +import {useLingui} from '@lingui/react' + +import {atoms as a} from '#/alf' +import * as ContextMenu from '#/components/ContextMenu' +import {ArrowOutOfBox_Stroke2_Corner0_Rounded as ShareIcon} from '#/components/icons/ArrowOutOfBox' +import {DotGrid3x1_Stroke2_Corner0_Rounded as DotsIcon} from '#/components/icons/DotGrid' +import {Download_Stroke2_Corner0_Rounded as DownloadIcon} from '#/components/icons/Download' +import {CircleChromeButton} from './CircleChromeButton' + +type Props = { + onPressShare: () => void + onPressSave: () => void +} + +export function ImageMenu({onPressShare, onPressSave}: Props) { + const {_} = useLingui() + + return ( + + + {triggerProps => { + if (triggerProps.IS_NATIVE) { + return ( + triggerProps.control.open('full')} + style={a.self_start}> + + + ) + } + return ( + + ) + }} + + + + + + {_(msg`Share image`)} + + + + {_(msg`Save image`)} + + + + ) +}