Skip to content

Commit 99fcd06

Browse files
committed
Update font size
1 parent dee67d0 commit 99fcd06

File tree

9 files changed

+34
-37
lines changed

9 files changed

+34
-37
lines changed

src/components/Text.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { Medium } from '@utils/fonts'
22
import React from 'react'
33
import type { TextProps } from 'react-native'
44

5-
export function TxtAcc({ children, size, ...rest }: TextProps & { size?: number }) {
5+
export function TxtAcc({ children, size, style, ...rest }: TextProps & { size?: number }) {
66
return (
7-
<Medium className='text-accent' style={{ fontSize: size || 11.5 }} {...rest}>
7+
<Medium className='text-accent' style={[{ fontSize: size || 11.5 }, style]} {...rest}>
88
{children}
99
</Medium>
1010
)
1111
}
1212

13-
export function Txt({ children, size, ...rest }: TextProps & { size?: number }) {
13+
export function Txt({ children, size, style, ...rest }: TextProps & { size?: number }) {
1414
return (
15-
<Medium className='text-zinc-500' style={{ fontSize: size || 11.5 }} {...rest}>
15+
<Medium className='text-zinc-500' style={[{ fontSize: size || 11.5 }, style]} {...rest}>
1616
{children}
1717
</Medium>
1818
)

src/screens/DeveloperOptions/MMKVDataEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Gap12 } from '@components/Gap'
55
import { Input } from '@components/Input'
66
import RoundedIcon from '@components/RoundedIcon'
77
import { SettGroup, SettOption, SettText, SettWrapper } from '@components/Settings'
8-
import { TxtAcc } from '@components/Text'
8+
import { Txt, TxtAcc } from '@components/Text'
99
import type { RouteProp } from '@react-navigation/native'
1010
import { Colors } from '@utils/colors'
1111
import { Medium } from '@utils/fonts'
@@ -107,7 +107,7 @@ export default function MMKVDataEditor({
107107
className='text-red-500'
108108
Icon={<RoundedIcon Icon={Delete02SolidIcon} className='bg-red-500' />}
109109
onPress={deleteData}
110-
Right={<Medium className='text-red-500'>{toReadableSize(value?.length || 0)}</Medium>}
110+
Right={<TxtAcc className='text-red-500'>{toReadableSize(value?.length || 0)}</TxtAcc>}
111111
/>
112112
</SettGroup>
113113
)}

src/screens/Weather/ConfirmCity.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Btn, { BtnTransparent } from '@components/Button'
33
import { PaddingBottom } from '@components/SafePadding'
44
import type { RouteProp } from '@react-navigation/native'
55
import { W } from '@utils/dimensions'
6-
import { Bold, F, Medium, SemiBold } from '@utils/fonts'
6+
import { Bold, F, Medium, Regular, SemiBold } from '@utils/fonts'
77
import type { StackNav } from '@utils/types'
88
import { getLatitude, getLongitude } from '@utils/utils'
99
import LottieView from 'lottie-react-native'
@@ -38,29 +38,30 @@ export default function ConfirmCity({
3838
<StatusBar barStyle='default' />
3939

4040
<View className='w-full flex-1 items-center justify-between px-[10%]'>
41+
<View></View>
4142
<View>
42-
<Bold style={{ fontSize: 32 }} className='my-8 mb-0 mt-10 text-center text-zinc-800 dark:text-zinc-200'>
43+
<SemiBold style={{ fontSize: 32 }} className='my-8 mb-0 mt-10 text-center text-zinc-800 dark:text-zinc-200'>
4344
{route.params.name}
44-
</Bold>
45+
</SemiBold>
4546
<Medium style={{ fontSize: 15.5 }} className='-mt-2 text-center text-zinc-700 dark:text-zinc-300'>
4647
{route.params.area}, {route.params.country}
4748
</Medium>
48-
<SemiBold style={{ fontSize: 11.5 }} className='text-center text-accent'>
49+
<Medium style={{ fontSize: 11.5 }} className='text-center text-accent'>
4950
{getLongitude(lon)}
5051
{' '}
5152
{getLatitude(lat)}
5253
{' '}
5354
{altitude} m
54-
</SemiBold>
55+
</Medium>
5556
</View>
56-
<LottieView
57+
{/* <LottieView
5758
source={require('@assets/animations/earth.lottie')}
5859
autoPlay
5960
loop={false}
6061
hardwareAccelerationAndroid
6162
cacheComposition
6263
style={{ width: W * 1.1, height: W * 1.1 }}
63-
/>
64+
/> */}
6465
<View className='w-full pb-3 pt-2' style={{ gap: 10 }}>
6566
<Medium style={F.F9_5} className='mb-3 text-center text-zinc-500 dark:text-zinc-500'>
6667
By setting this location, you will be able to view the weather of this location in the home screen and the

src/screens/Weather/Main/components/FeelsLike.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { weatherStore } from '@/zustand/weatherStore'
22
import { TemperatureSolidIcon } from '@assets/icons/icons'
3-
import { Medium, Regular } from '@utils/fonts'
3+
import { F, Medium, Regular } from '@utils/fonts'
44
import type { Theme } from '@utils/types'
55
import { tempConverter } from '@utils/utils'
66
import React from 'react'
@@ -23,9 +23,7 @@ export default function FeelsLike({ theme, feelsLike, feelsLikeStatus }: FeelsLi
2323
<Medium style={[{ fontSize: 37 }, theme.color]}>
2424
{tempConverter({ temp: feelsLike, unit: unit, degree: true })}
2525
</Medium>
26-
<Regular className='text-xs' style={theme.color}>
27-
{feelsLikeStatus}
28-
</Regular>
26+
<Regular style={[theme.color, F.F12]}>{feelsLikeStatus}</Regular>
2927
</View>
3028
</View>
3129
)

src/screens/Weather/Main/components/Humidity.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { weatherStore } from '@/zustand/weatherStore'
22
import { HumiditySolidIcon } from '@assets/icons/icons'
3-
import { Medium, Regular } from '@utils/fonts'
3+
import { F, Medium, Regular } from '@utils/fonts'
44
import type { Theme } from '@utils/types'
55
import { tempConverter } from '@utils/utils'
66
import React from 'react'
@@ -24,7 +24,7 @@ export default function Humidity({ humidity, theme, dew_point }: HumidityProps)
2424
<View className='w-full rounded-full bg-white/10'>
2525
<View className='h-1.5 rounded-full bg-white/70' style={{ width: `${humidity}%` }} />
2626
</View>
27-
<Regular className='text-xs' style={theme.color}>
27+
<Regular style={[theme.color, F.F12]}>
2828
The due point is {tempConverter({ temp: dew_point, unit: unit, degree: true })} right now.
2929
</Regular>
3030
</View>

src/screens/Weather/Main/components/Visibility.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EyeSolidIcon } from '@assets/icons/icons'
22
import { boxSize } from '@screens/Weather/utils'
3-
import { Medium, Regular } from '@utils/fonts'
3+
import { F, Medium, Regular } from '@utils/fonts'
44
import type { Theme } from '@utils/types'
55
import React from 'react'
66
import { View } from 'react-native'
@@ -18,9 +18,7 @@ export default function Visibility({ theme, visibility, visibilityStatus }: Visi
1818
<WeatherLabel Icon={EyeSolidIcon} color={theme.color} label='Visibility' />
1919
<View className='flex-1 justify-between px-5 pb-4 pt-0'>
2020
<Medium style={[{ fontSize: 33 }, theme.color]}>{visibility}</Medium>
21-
<Regular className='text-xs' style={theme.color}>
22-
{visibilityStatus}
23-
</Regular>
21+
<Regular style={[theme.color, F.F12]}>{visibilityStatus}</Regular>
2422
</View>
2523
</View>
2624
)

src/screens/Weather/Main/components/WeatherTopInfo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function WeatherTopInfo({ color, w }: WeatherTopInfoProps) {
1818
const currentUnit = weatherStore((state) => state.temperatureUnit)
1919
return (
2020
<View className='flex-1 px-5'>
21-
<Medium className='mt-7 text-center' style={[color, { fontSize: 22 }]}>
21+
<Medium className='mt-7 text-center' style={[color, { fontSize: 20 }]}>
2222
{currentCity?.name}
2323
</Medium>
2424
<View className='flex-row justify-center pb-3'>
@@ -30,11 +30,11 @@ export default function WeatherTopInfo({ color, w }: WeatherTopInfoProps) {
3030
</Light>
3131
<Regular style={[color, { fontSize: 50 }]}>{currentUnit === 'K' ? '' : '°'}</Regular>
3232
</View>
33-
<Medium className='-mt-4 text-center text-sm' style={[color, { fontSize: 14 }]}>
33+
<Medium className='-mt-4 text-center text-sm' style={[color, { fontSize: 13 }]}>
3434
{'Feels like ' + tempConverter({ temp: w?.current.feels_like || 0, unit: currentUnit, degree: true })}{' '}
3535
{currentUnit}
3636
</Medium>
37-
<Medium className='mt-1 text-center text-base capitalize' style={[color, { fontSize: 15 }]}>
37+
<Medium className='mt-1 text-center text-base capitalize' style={[color, { fontSize: 14 }]}>
3838
{w ? w.current.weather[0]!.description : '__'}
3939
</Medium>
4040
{/* <Medium className='mt-0.5 text-center text-base' style={color}>

src/screens/Weather/WeatherSearchCity.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import StackHeader from '@components/StackHeader'
55
import type { RouteProp } from '@react-navigation/native'
66
import { useMutation } from '@tanstack/react-query'
77
import { Colors } from '@utils/colors'
8-
import { F, Medium, SemiBold } from '@utils/fonts'
8+
import { F, Medium, Regular, SemiBold } from '@utils/fonts'
99
import type { StackNav } from '@utils/types'
1010
import { getLatitude, getLongitude } from '@utils/utils'
1111
import React from 'react'
@@ -173,18 +173,18 @@ function CityCard({
173173
>
174174
<View>
175175
<Medium className='text-sm text-zinc-800 dark:text-zinc-200'>{item.EnglishName}</Medium>
176-
<Medium className='text-xs text-zinc-600 dark:text-zinc-400'>
176+
<Regular className='text-xs text-zinc-600 dark:text-zinc-400'>
177177
{item.AdministrativeArea.EnglishName}, {item.Country.EnglishName}
178-
</Medium>
178+
</Regular>
179179
</View>
180180

181181
<View>
182-
<Medium className='text-right text-accent' style={F.F9_5}>
182+
<Regular className='text-right text-accent' style={F.F9_5}>
183183
{lat}, {lon}
184-
</Medium>
185-
<Medium className='text-right text-accent' style={F.F9_5}>
184+
</Regular>
185+
<Regular className='text-right text-accent' style={F.F9_5}>
186186
Altitude: {item.GeoPosition.Elevation.Metric.Value} {item.GeoPosition.Elevation.Metric.Unit}
187-
</Medium>
187+
</Regular>
188188
</View>
189189
</TouchableOpacity>
190190
)

src/screens/Weather/Widget/WeatherWidget.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styles, { hw } from '@screens/Home/style'
33
import { Canvas, LinearGradient, Rect, vec } from '@shopify/react-native-skia'
44
import { useMutation } from '@tanstack/react-query'
55
import { WeatherColors } from '@utils/colors'
6-
import { Medium, Regular } from '@utils/fonts'
6+
import { F, Medium, Regular } from '@utils/fonts'
77
import type { StackNav, Theme } from '@utils/types'
88
import { tempConverter } from '@utils/utils'
99
import React, { useCallback, useEffect } from 'react'
@@ -88,7 +88,7 @@ const WeatherWidget = React.memo<{ navigation: StackNav }>(({ navigation }) => {
8888
</Canvas>
8989
<TouchableOpacity
9090
style={[hw, styles.shadow]}
91-
className='justify-between p-4'
91+
className='justify-between p-4 pb-3.5'
9292
activeOpacity={0.7}
9393
onPress={() => navigation.navigate('Weather')}
9494
>
@@ -106,14 +106,14 @@ const WeatherWidget = React.memo<{ navigation: StackNav }>(({ navigation }) => {
106106
</View>
107107
<View>
108108
<Icon width={25} height={25} color={color.color} />
109-
<Medium style={[color]} className='mt-0.5 text-xs capitalize'>
109+
<Medium style={[color, F.F11]} className='mt-0.5 capitalize'>
110110
{w ? w.current.weather[0]!.description : '__'}
111111
{/* {w.current.weather[0].icon} */}
112112
</Medium>
113113
{/* <Medium style={[color]}>
114114
H:{w ? tempConverter(w.daily[0].temp.max, currentUnit) : '__'}° L: {w ? tempConverter(w.daily[0].temp.min, currentUnit) : '__'}°
115115
</Medium> */}
116-
<Medium style={[color]} className='text-xs'>
116+
<Medium style={[color, F.F11]}>
117117
{w ? tempConverter({ temp: w.daily[0]!.temp.min, unit: currentUnit }) : '__'}
118118
{currentUnit === 'K' ? currentUnit : '° ' + currentUnit} /{' '}
119119
{w ? tempConverter({ temp: w.daily[0]!.temp.max, unit: currentUnit }) : '__'}

0 commit comments

Comments
 (0)