Skip to content

Commit a62fb18

Browse files
committed
refactor: update background colors and text sizes for consistency across components
1 parent 55e37fa commit a62fb18

10 files changed

Lines changed: 34 additions & 18 deletions

File tree

global.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99
--color-g2: #3866D5;
1010
--color-g1: #8101E9;
1111
--color-app-icon-bg: #191C21;
12+
13+
--bg: #f2f2f3;
14+
--bg-card: #fff;
15+
--bg-card-dark: #0d0d0f;
1216
}
1317

18+
1419
.d {
1520
@apply border border-red-500;
1621
}
@@ -20,5 +25,9 @@
2025
}
2126

2227
.bg {
23-
@apply bg-zinc-100 dark:bg-black;
28+
@apply bg-(--bg) dark:bg-black;
2429
}
30+
31+
.bg-card {
32+
@apply bg-(--bg-card) dark:bg-(--bg-card-dark);
33+
}

src/components/BackHeader.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type BackHeaderProps = ViewProps & {
1818
export default function BackHeader({ navigation, Right, title, Title, onBackPress }: BackHeaderProps) {
1919
const scheme = useColorScheme()
2020
return (
21-
<View className='bg-white px-5 pr-6 pb-0.5 pl-1 dark:bg-zinc-950'>
21+
<View className='bg-card px-5 pr-6 pb-0.5 pl-1'>
2222
<PaddingTop />
2323
<View>
2424
{Title || (
@@ -29,8 +29,8 @@ export default function BackHeader({ navigation, Right, title, Title, onBackPres
2929
activeOpacity={0.7}
3030
>
3131
<ArrowLeft01Icon
32-
strokeWidth={1.7}
33-
size={26}
32+
strokeWidth={1.75}
33+
size={27}
3434
color={scheme === 'dark' ? Colors.zinc[200] : Colors.zinc[800]}
3535
/>
3636
</TouchableOpacity>

src/components/Popup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ const Popup = React.memo<PopupT>(({ text, title, buttons, index, noClose }) => {
3232
}}
3333
>
3434
<View className='flex-1 items-center justify-center bg-black/40 dark:bg-black/50'>
35-
<View className='w-[85%] rounded-xl bg-white dark:bg-zinc-900'>
35+
<View className='w-[85%] rounded-3xl bg-white dark:bg-zinc-900'>
3636
<View className='px-6 pt-5'>
37-
<SemiBold className='text-base text-black dark:text-white'>{title}</SemiBold>
37+
<SemiBold className='text-xl text-black dark:text-white'>{title}</SemiBold>
3838
<ScrollView style={{ maxHeight: H * 0.65, marginTop: 10 }}>
39-
<Medium className='text-sm text-black dark:text-white' style={{ fontSize: MAIN_TEXT_SIZE }}>
39+
<Medium className='text-sm text-black dark:text-white' style={{ fontSize: MAIN_TEXT_SIZE + 1 }}>
4040
{text}
4141
</Medium>
4242
</ScrollView>

src/components/Settings/SettGroup.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SMALL_TEXT_SIZE } from '@components/values'
1+
import { SUB_TEXT_SIZE } from '@components/values'
22
import { Colors } from '@utils/colors'
33
import { SemiBold } from '@utils/fonts'
44
import { cn, layout } from '@utils/utils'
@@ -11,11 +11,18 @@ type SettGroupProps = ViewProps & {
1111
}
1212
export default function SettGroup({ children, title, className, accent = Colors.accent, ...rest }: SettGroupProps) {
1313
return (
14-
<Animated.View className={cn('bg-white py-3 dark:bg-zinc-950', className)} layout={layout} {...rest}>
14+
<Animated.View
15+
className={cn('bg-card py-3 mx-3.5 ', className)}
16+
layout={layout}
17+
{...rest}
18+
style={{
19+
borderRadius: 20,
20+
}}
21+
>
1522
{title && (
1623
<SemiBold
1724
className={'px-6 pb-1.5 pt-0.5 text-accent'}
18-
style={{ textTransform: 'none', opacity: 1, fontSize: SMALL_TEXT_SIZE, color: accent, marginBottom: 5 }}
25+
style={{ textTransform: 'none', opacity: 1, fontSize: SUB_TEXT_SIZE, color: accent, marginBottom: 5 }}
1926
>
2027
{title}
2128
</SemiBold>

src/components/Settings/SettOption.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function SettOption({
2828
}: SettOptionProps) {
2929
return (
3030
<TouchableOpacity
31-
className={cn('flex-row items-center justify-between px-6', className)}
31+
className={cn('flex-row items-center justify-between px-5', className)}
3232
onPress={onPress}
3333
activeOpacity={0.7}
3434
style={[{ gap: 10 }]}

src/components/Settings/SettText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TextProps } from 'react-native'
66
export default function SettText({ children, className, ...rest }: TextProps) {
77
const newLocal = cn('px-5 text-zinc-500 dark:text-zinc-500', className)
88
return (
9-
<Medium className={newLocal} {...rest} style={{ fontSize: SMALL_TEXT_SIZE, lineHeight: SMALL_TEXT_SIZE * 1.5 }}>
9+
<Medium className={newLocal} {...rest} style={{ fontSize: 12, lineHeight: 12 * 1.5 }}>
1010
{children}
1111
</Medium>
1212
)

src/components/Settings/SettWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AutoStatusBar } from '@components/StatusBar'
66
import { useNavigation } from '@react-navigation/native'
77
import { StackNav } from '@utils/types'
88
import React from 'react'
9-
import { ScrollViewProps, useColorScheme, View } from 'react-native'
9+
import { ScrollViewProps, View, useColorScheme } from 'react-native'
1010

1111
type SettWrapperProps = ScrollViewProps & {
1212
Header?: React.ReactNode

src/components/values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ export const MAIN_TEXT_SIZE = 14
22
export const MAIN_BUTTON_SIZE = 15
33
export const SUB_TEXT_SIZE = 13
44
export const SMALL_TEXT_SIZE = 11
5-
export const HEADING_SIZE = 17
5+
export const HEADING_SIZE = 18
66
export const LARGE_HEADING_SIZE = 20

src/screens/DeveloperOptions/DeveloperOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function DeveloperOptions({ navigation }: NavProp) {
6666

6767
return (
6868
<SettWrapper title='Developer Options'>
69-
<Gap12>
69+
<Gap12 className='mt-4'>
7070
<SettGroup>
7171
<SettOption
7272
title='Developer Options'

src/screens/Settings/Settings/Settings.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import PolicyIcon from '@hugeicons/PolicyIcon'
2828
import ShieldUserIcon from '@hugeicons/ShieldUserIcon'
2929
import SquareArrowUp02Icon from '@hugeicons/SquareArrowUp02Icon'
3030
import SquareLock02Icon from '@hugeicons/SquareLock02Icon'
31+
import SunCloudAngledRainZap01Icon from '@hugeicons/SunCloudAngledRainZap01Icon'
3132
import TelegramIcon from '@hugeicons/TelegramIcon'
3233
import UserIcon from '@hugeicons/UserIcon'
3334
import Wallet02Icon from '@hugeicons/Wallet02Icon'
@@ -46,12 +47,11 @@ import { ToastAndroid, View, useColorScheme } from 'react-native'
4647
import { ScrollView } from 'react-native-gesture-handler'
4748
import Animated, { FadeIn } from 'react-native-reanimated'
4849
import AdminSettings from './AdminSettings'
49-
import SunCloudAngledRainZap01Icon from '@hugeicons/SunCloudAngledRainZap01Icon'
5050

5151
function SettingsHeader({ title, Title }: { title?: string; Title?: React.ReactNode }) {
5252
const [search, setSearch] = React.useState('')
5353
return (
54-
<View style={{ gap: 5 }} className='bg-white px-5 pb-3 dark:bg-zinc-950'>
54+
<View style={{ gap: 5 }} className='bg-card px-5 pb-3 '>
5555
{Title}
5656
<Bold style={{ fontSize: 24 }} className='mt-3 text-zinc-800 dark:text-zinc-200'>
5757
{title}
@@ -103,7 +103,7 @@ export default function Settings({ navigation }: NavProp) {
103103
}
104104

105105
return (
106-
<View className='flex-1 bg-white dark:bg-zinc-950'>
106+
<View className='flex-1 bg-card'>
107107
<PaddingTop />
108108
<ScrollView
109109
contentContainerStyle={{ paddingBottom: 30, backgroundColor: scheme === 'dark' ? 'black' : Colors.zinc[100] }}

0 commit comments

Comments
 (0)