refactor(lightbox): simplify ImageMenu trigger
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import {Pressable} from 'react-native'
|
|
||||||
import {msg} from '@lingui/core/macro'
|
import {msg} from '@lingui/core/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {atoms as a} from '#/alf'
|
|
||||||
import * as ContextMenu from '#/components/ContextMenu'
|
import * as ContextMenu from '#/components/ContextMenu'
|
||||||
import {ArrowOutOfBox_Stroke2_Corner0_Rounded as ShareIcon} from '#/components/icons/ArrowOutOfBox'
|
import {ArrowOutOfBox_Stroke2_Corner0_Rounded as ShareIcon} from '#/components/icons/ArrowOutOfBox'
|
||||||
import {DotGrid3x1_Stroke2_Corner0_Rounded as DotsIcon} from '#/components/icons/DotGrid'
|
import {DotGrid3x1_Stroke2_Corner0_Rounded as DotsIcon} from '#/components/icons/DotGrid'
|
||||||
@@ -28,15 +26,11 @@ export function ImageMenu({onPressShare, onPressSave}: Props) {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<CircleChromeButton
|
||||||
accessible={false}
|
icon={DotsIcon}
|
||||||
|
label={_(msg`Image options`)}
|
||||||
onPress={() => triggerProps.control.open('full')}
|
onPress={() => triggerProps.control.open('full')}
|
||||||
style={a.self_start}>
|
/>
|
||||||
<CircleChromeButton
|
|
||||||
icon={DotsIcon}
|
|
||||||
label={_(msg`Image options`)}
|
|
||||||
/>
|
|
||||||
</Pressable>
|
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</ContextMenu.Trigger>
|
</ContextMenu.Trigger>
|
||||||
|
|||||||
Reference in New Issue
Block a user