Skip to content

Commit

Permalink
Fix some colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Perronef5 committed Sep 23, 2024
1 parent a403d47 commit 45c1105
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
17 changes: 9 additions & 8 deletions src/features/browser/BrowserWebViewScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SolanaSignMessageInput,
} from '@solana/wallet-standard-features'
import { Transaction, VersionedTransaction } from '@solana/web3.js'
import { useSpacing } from '@theme/themeHooks'
import { useColors, useSpacing } from '@theme/themeHooks'
import bs58 from 'bs58'
import React, { useCallback, useMemo, useRef, useState } from 'react'
import { Platform, StyleSheet } from 'react-native'
Expand Down Expand Up @@ -67,6 +67,7 @@ const BrowserWebViewScreen = () => {
const isAndroid = useMemo(() => Platform.OS === 'android', [])
const spacing = useSpacing()
const [isScriptInjected, setIsScriptInjected] = useState(false)
const { primaryText } = useColors()

const isFavorite = useMemo(() => {
return favorites.some((favorite) => favorite === currentUrl)
Expand Down Expand Up @@ -458,11 +459,11 @@ const BrowserWebViewScreen = () => {
</Text>
</Box>
<TouchableOpacityBox onPress={closeModal} paddingHorizontal="4">
<Close color="primaryText" width={14} height={14} />
<Close color={primaryText} width={14} height={14} />
</TouchableOpacityBox>
</Box>
)
}, [currentUrl, closeModal, spacing])
}, [currentUrl, closeModal, spacing, primaryText])

const onBack = useCallback(() => {
webview.current?.goBack()
Expand All @@ -485,20 +486,20 @@ const BrowserWebViewScreen = () => {
<Box padding="4" flexDirection="row" backgroundColor="base.black">
<Box flexGrow={1} alignItems="center">
<TouchableOpacityBox onPress={onBack}>
<BackArrow width={20} height={20} />
<BackArrow width={20} height={20} color={primaryText} />
</TouchableOpacityBox>
</Box>
<Box flexGrow={1} alignItems="center">
<TouchableOpacityBox style={styles.rotatedArrow} onPress={onForward}>
<BackArrow width={20} height={20} />
<BackArrow width={20} height={20} color={primaryText} />
</TouchableOpacityBox>
</Box>
<Box flexGrow={1} alignItems="center">
<TouchableOpacityBox onPress={onFavorite}>
{isFavorite ? (
<BookmarkFilled color="primaryText" width={20} height={20} />
<BookmarkFilled color={primaryText} width={20} height={20} />
) : (
<Bookmark color="primaryText" width={20} height={20} />
<Bookmark color={primaryText} width={20} height={20} />
)}
</TouchableOpacityBox>
</Box>
Expand All @@ -509,7 +510,7 @@ const BrowserWebViewScreen = () => {
</Box>
</Box>
)
}, [onBack, onForward, isFavorite, onFavorite, onRefresh])
}, [onBack, onForward, isFavorite, onFavorite, onRefresh, primaryText])

return (
<Box position="absolute" top={0} left={0} right={0} bottom={0}>
Expand Down
4 changes: 3 additions & 1 deletion src/features/home/addNewAccount/AddNewAccountScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const AddNewAccountScreen = () => {
<Box backgroundColor="bg.tertiary">
<Box flexDirection="row" paddingVertical="4">
<Box flex={1} />
<Text variant="textXlMedium">{t('addNewAccount.title')}</Text>
<Text variant="textXlMedium" color="primaryText">
{t('addNewAccount.title')}
</Text>
<Box flex={1} />
</Box>
<TabBar
Expand Down
1 change: 1 addition & 0 deletions src/features/ledger/DeviceScan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ const DeviceScan = () => {
marginVertical="6"
textAlign="center"
lineHeight={38}
color="primaryText"
>
{t('ledger.scan.title')}
</Text>
Expand Down
10 changes: 7 additions & 3 deletions src/features/ledger/LedgerConnectSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const LedgerConnectSteps = ({ onLayout, onRetry }: Props) => {
alignItems="center"
>
<Check color={primaryText} height={24} width={24} />
<Text variant="textXlMedium" marginLeft="3">
<Text variant="textXlMedium" marginLeft="3" color="primaryText">
{step}
</Text>
</Box>
Expand All @@ -48,11 +48,15 @@ const LedgerConnectSteps = ({ onLayout, onRetry }: Props) => {
marginTop="2"
marginBottom="6"
onPress={onRetry}
backgroundColor="cardBackground"
backgroundColor="primaryText"
padding="6"
borderRadius="full"
>
<Text variant="textXlMedium" textAlign="center">
<Text
variant="textXlMedium"
textAlign="center"
color="primaryBackground"
>
{t('generic.tryAgain')}
</Text>
</TouchableOpacityBox>
Expand Down
8 changes: 3 additions & 5 deletions src/features/ledger/LedgerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const LedgerModal = forwardRef(
const bottomSheetModalRef = useRef<BottomSheetModal>(null)
const { backgroundStyle } = useOpacity('bg.tertiary', 1)
const { setIsShowing } = useBackHandler(bottomSheetModalRef)
const { secondaryText } = useColors()
const { primaryText } = useColors()
const { t } = useTranslation()
const { getTransport, openSolanaApp } = useLedger()
const [transactionBuffer, setTransactionBuffer] = useState<Buffer>()
Expand Down Expand Up @@ -216,9 +216,9 @@ const LedgerModal = forwardRef(

const handleIndicatorStyle = useMemo(() => {
return {
backgroundColor: secondaryText,
backgroundColor: primaryText,
}
}, [secondaryText])
}, [primaryText])

const deviceModelId = useMemo(() => {
let model = DeviceModelId.nanoX
Expand Down Expand Up @@ -335,13 +335,11 @@ const LedgerModal = forwardRef(
return (
<Box flex={1}>
<BottomSheetModalProvider>
{/* <Box flex={1} {...boxProps}> */}
<BottomSheetModal
ref={bottomSheetModalRef}
index={0}
backgroundStyle={backgroundStyle}
backdropComponent={renderBackdrop}
// onDismiss={handleModalDismiss}
handleIndicatorStyle={handleIndicatorStyle}
contentHeight={animatedContentHeight}
enableDynamicSizing
Expand Down
5 changes: 3 additions & 2 deletions src/features/ledger/PairStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ const PairStart = () => {
variant="displayLgRegular"
textAlign="center"
marginVertical="6"
color="primaryText"
>
{t('ledger.pairStart.title')}
</Text>
<Text variant="textXlMedium" textAlign="center">
<Text variant="textXlMedium" textAlign="center" color="secondaryText">
{t('ledger.pairStart.subtitle')}
</Text>
</Box>
Expand All @@ -62,7 +63,7 @@ const PairStart = () => {
backgroundColorDisabled="bg.tertiary"
backgroundColorDisabledOpacity={0.5}
titleColorDisabled="gray.800"
titleColor="primaryText"
titleColor="primaryBackground"
fontWeight="500"
title={t('ledger.pairStart.pair')}
marginBottom="6"
Expand Down
2 changes: 1 addition & 1 deletion src/features/swaps/SwapItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const SwapItem = ({
{isPaying ? t('swapsScreen.youPay') : t('swapsScreen.youReceive')}
</Text>
<Box flexDirection="row">
<Text marginEnd="2" variant="textXlRegular">
<Text marginEnd="2" variant="textXlRegular" color="primaryText">
{!loading ? amount.toString() : t('generic.loading')}
</Text>
<Text
Expand Down

0 comments on commit 45c1105

Please sign in to comment.