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(mobile): fix header font to Inter #224

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions apps/mobile/app/(app)/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function TabLayout() {
backgroundColor: theme[colorScheme ?? 'light'].background,
},
headerTitleStyle: {
fontFamily: 'Be Vietnam Pro Medium',
fontFamily: 'Inter Medium',
fontSize: 16,
color: theme[colorScheme ?? 'light'].primary,
},
Expand All @@ -66,7 +66,7 @@ export default function TabLayout() {
options={{
headerTitle: t(i18n)`Budgets`,
headerTitleStyle: {
fontFamily: 'Be Vietnam Pro Medium',
fontFamily: 'Inter Medium',
fontSize: 16,
color: theme[colorScheme ?? 'light'].primary,
marginLeft: 5,
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(app)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function AuthenticatedLayout() {
headerTintColor: theme[colorScheme ?? 'light'].primary,
headerShadowVisible: false,
headerTitleStyle: {
fontFamily: 'Be Vietnam Pro Medium',
fontFamily: 'Inter Medium',
fontSize: 16,
color: theme[colorScheme ?? 'light'].primary,
},
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(aux)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function AuxiliaryLayout() {
headerTintColor: theme[colorScheme ?? 'light'].primary,
headerShadowVisible: false,
headerTitleStyle: {
fontFamily: 'Be Vietnam Pro Medium',
fontFamily: 'Inter Medium',
fontSize: 16,
color: theme[colorScheme ?? 'light'].primary,
},
Expand Down
2 changes: 2 additions & 0 deletions apps/mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
useFonts,
} from '@expo-google-fonts/inter'
import {
Expand Down Expand Up @@ -115,6 +116,7 @@ function RootLayout() {
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
})
const ref = useNavigationContainerRef()

Expand Down
17 changes: 3 additions & 14 deletions apps/mobile/components/budget/budget-statistic.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useDefaultCurrency } from '@/stores/user-settings/hooks'
import { t } from '@lingui/macro'
import { useLingui } from '@lingui/react'
import { View } from 'react-native'
import { AmountFormat } from '../common/amount-format'
import { Text } from '../ui/text'

type BudgetStatisticProps = {
Expand All @@ -14,28 +14,17 @@ export function BudgetStatistic({
remainingPerDay,
}: BudgetStatisticProps) {
const { i18n } = useLingui()
const defaultCurrency = useDefaultCurrency()

return (
<View className="flex-row items-center justify-between gap-6">
<View className="gap-1">
<Text className="font-bold text-2xl">
{totalRemaining?.toLocaleString() || '0.00'}{' '}
<Text className="font-normal text-muted-foreground text-sm">
{defaultCurrency}
</Text>
</Text>
<AmountFormat amount={totalRemaining} />
<Text className="text-muted-foreground">
{t(i18n)`Left this month`}
</Text>
</View>
<View className="gap-1">
<Text className="text-right font-bold text-2xl">
{remainingPerDay?.toLocaleString() || '0.00'}{' '}
<Text className="font-normal text-muted-foreground text-sm">
{defaultCurrency}
</Text>
</Text>
<AmountFormat amount={remainingPerDay} />
<Text className="text-right text-muted-foreground">
{t(i18n)`Left per day`}
</Text>
Expand Down
6 changes: 3 additions & 3 deletions apps/mobile/components/common/amount-format.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ import { type VariantProps, cva } from 'class-variance-authority'
import { useMemo } from 'react'
import { Text } from '../ui/text'

const amountVariants = cva('shrink-0 font-bold', {
const amountVariants = cva('shrink-0 font-semibold', {
variants: {
size: {
xl: 'text-4xl',
lg: 'text-3xl',
md: 'text-2xl',
sm: 'text-lg',
sm: 'text-base',
},
},
defaultVariants: {
size: 'md',
},
})

const currencyVariants = cva('text-muted-foreground', {
const currencyVariants = cva('font-medium text-muted-foreground', {
variants: {
size: {
xl: 'text-base',
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/components/common/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function ToastRoot() {
extraInsets={{ top: -12 }}
defaultStyle={{
text: {
fontFamily: 'Be Vietnam Pro Medium',
fontFamily: 'Inter Medium',
},
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/components/numeric-pad/numeric-pad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function NumericPad({
size="lg"
onPressIn={Haptics.selectionAsync}
>
<Text className="!text-2xl font-bold">{buttonKey}</Text>
<Text className="!text-2xl font-semibold">{buttonKey}</Text>
</Button>
</View>
))}
Expand Down
7 changes: 5 additions & 2 deletions apps/mobile/components/text-ticker/text-ticker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function TextTicker({
>
<Animated.Text
style={[style, { fontSize }]}
className={className}
className={cn(className, 'font-semibold')}
>
{formattedNumber.value}
</Animated.Text>
Expand All @@ -120,7 +120,10 @@ export function TextTicker({
<TouchableOpacity activeOpacity={0.8} onPress={onPressSuffix}>
<Animated.Text
style={{ fontSize: fontSize / 3 }}
className={suffixClassName}
className={cn(
suffixClassName,
'font-medium text-muted-foreground',
)}
>
{suffix}
</Animated.Text>
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/components/transaction/transaction-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ function TransactionAmount() {
<>
<TextTicker
value={amount}
className="text-center font-bold text-6xl text-foreground leading-tight"
className="text-center text-6xl text-foreground leading-tight"
suffix={currency}
suffixClassName="font-bold ml-2 text-muted-foreground overflow-visible"
suffixClassName="ml-2 text-muted-foreground overflow-visible"
onPressSuffix={() => {
Haptics.selectionAsync()
sheetRef.current?.present()
Expand Down