From 37b82e107b14fb041f0a2ef4d2a589ea50cb3bfd Mon Sep 17 00:00:00 2001 From: Barry van Veen Date: Wed, 13 May 2026 13:59:17 +0200 Subject: [PATCH] Get font sizes from theme to account for overrides --- src/components/InputField.tsx | 6 +++--- src/components/Notification.tsx | 3 +-- src/components/ProgressBarList.tsx | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/InputField.tsx b/src/components/InputField.tsx index 0f8f240..cd2ee65 100644 --- a/src/components/InputField.tsx +++ b/src/components/InputField.tsx @@ -3,7 +3,7 @@ import { Platform, StyleProp, StyleSheet, Text, TextInput, TextInputProps, View, import { Icon } from './Icon' import IconText from './IconText' -import { font, layout, rounded } from '../styles' +import { layout, rounded } from '../styles' import { Theme, createInputStyles, useStyles, useTheme } from '../theme' type Props = { @@ -128,11 +128,11 @@ const createStyles = (theme: Theme) => { justifyContent: 'center', }, errorStyle: { - ...font.small, + ...theme.font.small, color: theme.color.text.system.error, }, descriptionStyle: { - ...font.small, + ...theme.font.small, color: theme.color.text.system.subtle, }, }) diff --git a/src/components/Notification.tsx b/src/components/Notification.tsx index c53c618..68dbdea 100644 --- a/src/components/Notification.tsx +++ b/src/components/Notification.tsx @@ -1,7 +1,6 @@ import React from 'react' import { StyleProp, Text, View, ViewStyle } from 'react-native' -import { font } from '../styles' import { useTheme } from '../theme/ThemeProvider' type Props = { @@ -27,7 +26,7 @@ const Notification = ({ count, style }: Props) => { > {count} diff --git a/src/components/ProgressBarList.tsx b/src/components/ProgressBarList.tsx index 3a4ebb4..7fc40e3 100644 --- a/src/components/ProgressBarList.tsx +++ b/src/components/ProgressBarList.tsx @@ -3,7 +3,6 @@ import { StyleSheet, Text, View } from 'react-native' import { Icon } from './Icon' import ProgressBar from '../data/ProgressBar' -import { font } from '../styles' import { Theme, useStyles, useTheme } from '../theme' type Props = { @@ -127,7 +126,7 @@ const createStyles = (theme: Theme) => paddingLeft: borderRadius, }, label: { - ...font.small, + ...theme.font.small, color: theme.overlay.white70, justifyContent: 'center', lineHeight: barHeight, @@ -150,12 +149,12 @@ const createStyles = (theme: Theme) => paddingRight: borderRadius, }, denominator: { - ...font.small, + ...theme.font.small, color: theme.overlay.white70, lineHeight: barHeight, }, numerator: { - ...font.smallBold, + ...theme.font.smallBold, color: theme.color.text.system.staticWhite, lineHeight: barHeight, },