Skip to content

Commit dee67d0

Browse files
committed
Update default font scaling for Text and TextInput components
1 parent d15bc1a commit dee67d0

36 files changed

+177
-143
lines changed

src/assets/icons/appIcon.png

-46 KB
Binary file not shown.

src/assets/icons/appIcon.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Loading

src/components/BackHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ export default function BackHeader({ navigation, Right, title, Title }: BackHead
2222
{Title || (
2323
<View className='flex-row items-center' style={{ gap: 10 }}>
2424
<TouchableOpacity
25-
className='p-3 pr-2'
25+
className='p-3 pr-0.5'
2626
onPress={() => navigation && navigation.goBack()}
2727
activeOpacity={0.7}
2828
>
2929
<ArrowLeft01Icon width={26} height={26} color={scheme === 'dark' ? Colors.zinc[200] : Colors.zinc[800]} />
3030
</TouchableOpacity>
3131
<Medium
32-
style={{ fontSize: 18, flex: 1 }}
32+
style={{ fontSize: 14.3, flex: 1 }}
3333
className='mt-0.5 text-zinc-800 dark:text-zinc-200'
3434
numberOfLines={1}
3535
>

src/components/Button.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ export default function Btn({ title, onPress, disabled, children, style, ...rest
1010
activeOpacity={0.8}
1111
onPress={onPress}
1212
className='w-full bg-accent'
13-
style={[{ borderRadius: 14, paddingVertical: 13, paddingHorizontal: 13, opacity: disabled ? 0.8 : 1 }, style]}
13+
style={[{ borderRadius: 14.5, paddingVertical: 13, paddingHorizontal: 13, opacity: disabled ? 0.8 : 1 }, style]}
1414
disabled={disabled}
1515
{...rest}
1616
>
17-
<Medium style={{ fontSize: 15 }} className='text-center text-white'>
17+
<Medium style={{ fontSize: 12.2 }} className='text-center text-white'>
1818
{title || children}
1919
</Medium>
2020
</TouchableOpacity>
@@ -27,9 +27,9 @@ export function BtnTransparent({ title, onPress, children, style }: ButtonProps)
2727
activeOpacity={0.7}
2828
onPress={onPress}
2929
className='w-full'
30-
style={[{ borderRadius: 14, paddingVertical: 13 }]}
30+
style={[{ borderRadius: 14.5, paddingVertical: 13 }]}
3131
>
32-
<Medium style={[{ fontSize: 15 }, style]} className='text-center text-accent'>
32+
<Medium style={[{ fontSize: 12.2 }, style]} className='text-center text-accent'>
3333
{title || children}
3434
</Medium>
3535
</TouchableOpacity>

src/components/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function Input({ Icon, Right, accent = Colors.accent, multiline, style, .
1616
{Icon}
1717
<TextInput
1818
className='flex-1 p-2.5 px-0 text-zinc-800 dark:text-zinc-200'
19-
style={[{ fontSize: 14.5, paddingVertical: 0, flex: 1 }, PoppinsMedium, style]}
19+
style={[{ fontSize: 12, paddingVertical: 0, flex: 1 }, PoppinsMedium, style]}
2020
placeholderTextColor={scheme === 'dark' ? Colors.zinc[500] : Colors.zinc[400]}
2121
cursorColor={accent}
2222
selectionColor={accent + '55'}

src/components/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function Search({ onChangeText, value, ...all }: TextInputProps)
3131
<TextInput
3232
ref={ref}
3333
className='flex-1 p-2 px-3 text-zinc-800 dark:text-zinc-200'
34-
style={[PoppinsMedium, { fontSize: 12.2 }]}
34+
style={[PoppinsMedium, { fontSize: 12.2, marginTop: 0.8 }]}
3535
placeholderTextColor={scheme === 'dark' ? Colors.zinc[500] : Colors.zinc[400]}
3636
cursorColor={Colors.accent}
3737
selectionColor={Colors.accent + '55'}

src/components/Settings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ArrowRight01Icon, Tick01Icon } from '@assets/icons/icons'
22
import { Colors } from '@utils/colors'
3-
import { Medium } from '@utils/fonts'
3+
import { F, Medium } from '@utils/fonts'
44
import type { StackNav } from '@utils/types'
55
import React from 'react'
66
import {
@@ -39,7 +39,7 @@ export function SettOption({ title, onPress, Icon, Right, style, arrow, numberOf
3939
{Icon}
4040
<Medium
4141
className='p-2.5 px-0 text-left text-zinc-800 dark:text-zinc-200'
42-
style={[{ fontSize: 14.5, flexShrink: 1 }, style]}
42+
style={[{ fontSize: 12, flexShrink: 1 }, style]}
4343
numberOfLines={numberOfLines || 0}
4444
>
4545
{title}
@@ -63,7 +63,7 @@ export function SettGroup({ children, title, color = Colors.accent, ...rest }: S
6363
{title && (
6464
<Medium
6565
className={'px-6 py-1.5 text-accent'}
66-
style={{ textTransform: 'none', opacity: 1, fontSize: 13, color: color }}
66+
style={{ textTransform: 'none', opacity: 1, fontSize: 10, color: color }}
6767
>
6868
{title}
6969
</Medium>
@@ -79,7 +79,7 @@ export function RightArrow() {
7979

8080
export function SettText({ children, style, ...rest }: TextProps) {
8181
return (
82-
<Medium className='px-5 text-xs text-zinc-500 dark:text-zinc-500' {...rest} style={[{ fontSize: 11 }, style]}>
82+
<Medium className='px-5 text-zinc-500 dark:text-zinc-500' {...rest} style={[F.F9, style]}>
8383
{children}
8484
</Medium>
8585
)

src/components/StackHeader.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@ export default function StackHeader({
2626
navigation,
2727
}: CardHeaderProps) {
2828
return (
29-
<View className='w-full flex-row items-center justify-between pb-1' style={{ gap: 5 }}>
29+
<View className='w-full flex-row items-center justify-between pb-1.5' style={{ gap: 5 }}>
3030
<View className='items-start' style={{ flex: 1 }}>
3131
<TouchableOpacity onPress={LeftOnPress || (() => navigation.goBack())} activeOpacity={0.7}>
3232
{Left || (
33-
<Medium className='px-0.5 py-1 pb-1 text-accent' style={{ fontSize: 15.5 }} numberOfLines={1}>
33+
<Medium className='px-0.5 py-1.5 pb-1 text-accent' style={{ fontSize: 13 }} numberOfLines={1}>
3434
{left}
3535
</Medium>
3636
)}
3737
</TouchableOpacity>
3838
</View>
3939
{Title || (
40-
<SemiBold className='text-center text-zinc-800 dark:text-zinc-200' style={{ fontSize: 16 }}>
40+
<SemiBold className='text-center text-zinc-800 dark:text-zinc-200' style={{ fontSize: 13 }}>
4141
{title}
4242
</SemiBold>
4343
)}
4444
<View className='flex-1 items-end'>
4545
<TouchableOpacity onPress={RightOnPress || (() => navigation.goBack())} activeOpacity={0.7}>
4646
{Right || (
47-
<Medium className='px-0.5 py-1 pb-1 text-accent' style={{ fontSize: 15.5 }}>
47+
<Medium className='px-0.5 py-1 pb-1.5 text-accent' style={{ fontSize: 13 }}>
4848
{right}
4949
</Medium>
5050
)}

src/components/Text.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import type { TextProps } from 'react-native'
44

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

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

0 commit comments

Comments
 (0)