Substring to only show first name, font size bigger.

Co-authored-by: Lee Sheppard <coolusername244@users.noreply.github.com>
Co-authored-by: Sebastian Palmqvist <PalmN72@users.noreply.github.com>
This commit is contained in:
lvan-ni 2023-10-10 13:58:17 +02:00
parent 7a6a1d7d70
commit e1f8c8b187
1 changed files with 6 additions and 2 deletions

View File

@ -19,7 +19,11 @@ export const NavigationTitle = ({title, subtitle}: NavigationTitleProps) => {
{title}
</Text>
)}
{subtitle && <Text style={styles.subtitle}>{subtitle}</Text>}
{subtitle && (
<Text style={styles.subtitle}>
{subtitle.substring(0, subtitle.indexOf(' '))}
</Text>
)}
</View>
);
};
@ -32,5 +36,5 @@ const styles = StyleSheet.create({
...fontSize.sm,
fontWeight: '500',
},
subtitle: {...fontSize.xxs},
subtitle: {...fontSize.base},
});