fix: 🐛 Fixes news title, lowered font size on header
This commit is contained in:
parent
33440bcc32
commit
7df15d36b1
|
@ -14,7 +14,11 @@ interface NavigationTitleProps {
|
|||
export const NavigationTitle = ({ title, subtitle }: NavigationTitleProps) => {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
{title && (
|
||||
<Text style={styles.title} numberOfLines={1} ellipsizeMode="tail">
|
||||
{title}
|
||||
</Text>
|
||||
)}
|
||||
<Text style={styles.subtitle}>{subtitle}</Text>
|
||||
</View>
|
||||
)
|
||||
|
@ -25,7 +29,7 @@ const styles = StyleSheet.create({
|
|||
...Layout.center,
|
||||
},
|
||||
title: {
|
||||
...fontSize.base,
|
||||
...fontSize.sm,
|
||||
fontWeight: '500',
|
||||
},
|
||||
subtitle: { ...fontSize.xxs },
|
||||
|
|
|
@ -38,10 +38,7 @@ export const newsItemRouteOptions =
|
|||
return {
|
||||
...defaultStackStyling(darkMode),
|
||||
headerCenter: () => (
|
||||
<NavigationTitle
|
||||
title={newsItem.header}
|
||||
subtitle={studentName(child?.name)}
|
||||
/>
|
||||
<NavigationTitle subtitle={studentName(child?.name)} />
|
||||
),
|
||||
headerLargeTitle: false,
|
||||
}
|
||||
|
@ -58,6 +55,9 @@ export const NewsItem = ({ route }: NewsItemProps) => {
|
|||
contentContainerStyle={styles.article}
|
||||
style={styles.scrollView}
|
||||
>
|
||||
<Text maxFontSizeMultiplier={2} style={styles.title}>
|
||||
{newsItem.header}
|
||||
</Text>
|
||||
{dateIsValid(newsItem.published) && (
|
||||
<Text
|
||||
maxFontSizeMultiplier={2}
|
||||
|
|
Loading…
Reference in New Issue