Fix tap target size of post dropdown menus (#1180)
This commit is contained in:
parent
0576caae36
commit
6ccfb1375a
8 changed files with 55 additions and 113 deletions
|
@ -60,7 +60,6 @@ export const DropdownMenuTrigger = DropdownMenu.create(
|
|||
icon="ellipsis"
|
||||
size={20}
|
||||
color={defaultCtrlColor}
|
||||
style={styles.ellipsis}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
|
@ -252,9 +251,6 @@ const styles = StyleSheet.create({
|
|||
height: 1,
|
||||
marginVertical: 4,
|
||||
},
|
||||
ellipsis: {
|
||||
padding: isWeb ? 0 : 10,
|
||||
},
|
||||
content: {
|
||||
backgroundColor: '#f0f0f0',
|
||||
borderRadius: 8,
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import React from 'react'
|
||||
import {StyleProp, View, ViewStyle} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {toShareUrl} from 'lib/strings/url-helpers'
|
||||
import {useStores} from 'state/index'
|
||||
import {useTheme} from 'lib/ThemeContext'
|
||||
import {shareUrl} from 'lib/sharing'
|
||||
import {
|
||||
NativeDropdown,
|
||||
|
@ -19,6 +22,7 @@ export function PostDropdownBtn({
|
|||
onOpenTranslate,
|
||||
onToggleThreadMute,
|
||||
onDeletePost,
|
||||
style,
|
||||
}: {
|
||||
testID: string
|
||||
itemUri: string
|
||||
|
@ -31,8 +35,11 @@ export function PostDropdownBtn({
|
|||
onOpenTranslate: () => void
|
||||
onToggleThreadMute: () => void
|
||||
onDeletePost: () => void
|
||||
style?: StyleProp<ViewStyle>
|
||||
}) {
|
||||
const store = useStores()
|
||||
const theme = useTheme()
|
||||
const defaultCtrlColor = theme.palette.default.postCtrl
|
||||
|
||||
const dropdownItems: NativeDropdownItem[] = [
|
||||
{
|
||||
|
@ -146,8 +153,11 @@ export function PostDropdownBtn({
|
|||
testID={testID}
|
||||
items={dropdownItems}
|
||||
accessibilityLabel="More post options"
|
||||
accessibilityHint=""
|
||||
/>
|
||||
accessibilityHint="">
|
||||
<View style={style}>
|
||||
<FontAwesomeIcon icon="ellipsis" size={20} color={defaultCtrlColor} />
|
||||
</View>
|
||||
</NativeDropdown>
|
||||
</EventStopper>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue