Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(qr-scanner): align times icon #6226

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions src/qrcode/QRTabBar.tsx
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These styles are a bit strange; however, I was able to test by using grids and two browser windows with images of the same size. There's probably a better way to match these styles; however, the squeeze may not be worth it.

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { MaterialTopTabBarProps } from '@react-navigation/material-top-tabs'
import React, { useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { Dimensions, StyleSheet, Text, View } from 'react-native'
import { Dimensions, Platform, StyleSheet, Text, View } from 'react-native'
import Animated, { Extrapolation, interpolate } from 'react-native-reanimated'
import { SafeAreaView } from 'react-native-safe-area-context'
import SegmentedControl from 'src/components/SegmentedControl'
import BackChevron from 'src/icons/BackChevron'
import Share from 'src/icons/Share'
import Times from 'src/icons/Times'
import { TopBarIconButton } from 'src/navigator/TopBarButton'
import { TopBarIconButtonV2 } from 'src/navigator/TopBarIconButtonV2'
import { useDispatch } from 'src/redux/hooks'
import { shareQRCode, SVG } from 'src/send/actions'
import colors from 'src/styles/colors'
Expand Down Expand Up @@ -74,7 +75,7 @@ export default function QRTabBar({
return (
<SafeAreaView style={styles.container} edges={['top']}>
<View style={styles.leftContainer}>
<TopBarIconButton
<TopBarIconButtonV2
icon={leftIcon === 'times' ? <Times color={color} /> : <BackChevron color={color} />}
onPress={onPressClose}
/>
Expand Down Expand Up @@ -114,16 +115,26 @@ const styles = StyleSheet.create({
right: 0,
flexDirection: 'row',
alignItems: 'center',
paddingVertical: 8,
paddingTop: Spacing.Regular16,
...Platform.select({
android: {
paddingTop: Spacing.Smallest8,
paddingVertical: Spacing.Smallest8,
},
ios: {
paddingTop: -3,
paddingHorizontal: Spacing.Tiny4,
},
}),
},
leftContainer: {
width: 50,
alignItems: 'center',
marginLeft: -1,
},
rightContainer: {
width: 50,
alignItems: 'center',
marginRight: -1,
},
headerTitleContainer: {
alignItems: 'center',
Expand Down
Loading