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) => {
|
export const NavigationTitle = ({ title, subtitle }: NavigationTitleProps) => {
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<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>
|
<Text style={styles.subtitle}>{subtitle}</Text>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -25,7 +29,7 @@ const styles = StyleSheet.create({
|
||||||
...Layout.center,
|
...Layout.center,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
...fontSize.base,
|
...fontSize.sm,
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
},
|
},
|
||||||
subtitle: { ...fontSize.xxs },
|
subtitle: { ...fontSize.xxs },
|
||||||
|
|
|
@ -38,10 +38,7 @@ export const newsItemRouteOptions =
|
||||||
return {
|
return {
|
||||||
...defaultStackStyling(darkMode),
|
...defaultStackStyling(darkMode),
|
||||||
headerCenter: () => (
|
headerCenter: () => (
|
||||||
<NavigationTitle
|
<NavigationTitle subtitle={studentName(child?.name)} />
|
||||||
title={newsItem.header}
|
|
||||||
subtitle={studentName(child?.name)}
|
|
||||||
/>
|
|
||||||
),
|
),
|
||||||
headerLargeTitle: false,
|
headerLargeTitle: false,
|
||||||
}
|
}
|
||||||
|
@ -58,6 +55,9 @@ export const NewsItem = ({ route }: NewsItemProps) => {
|
||||||
contentContainerStyle={styles.article}
|
contentContainerStyle={styles.article}
|
||||||
style={styles.scrollView}
|
style={styles.scrollView}
|
||||||
>
|
>
|
||||||
|
<Text maxFontSizeMultiplier={2} style={styles.title}>
|
||||||
|
{newsItem.header}
|
||||||
|
</Text>
|
||||||
{dateIsValid(newsItem.published) && (
|
{dateIsValid(newsItem.published) && (
|
||||||
<Text
|
<Text
|
||||||
maxFontSizeMultiplier={2}
|
maxFontSizeMultiplier={2}
|
||||||
|
|
Loading…
Reference in New Issue