feat : header bar is now following theme
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
300ee8f8ba
commit
87edec02d1
@ -1,19 +1,23 @@
|
|||||||
import React from 'react';
|
import React, { useContext } from 'react';
|
||||||
import { Text, StyleSheet } from 'react-native';
|
import { Text, StyleSheet } from 'react-native';
|
||||||
|
|
||||||
|
import ThemeContext from '../theme/ThemeContext';
|
||||||
|
|
||||||
export function HeaderTitle(props) {
|
export function HeaderTitle(props) {
|
||||||
|
const {theme, toggleTheme} = useContext(ThemeContext);
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
headerTitle: {
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
color: theme === 'light' ? '#3F3C42' : '#F2F0E4',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Text
|
<Text
|
||||||
style={styles.headerTitle}>
|
style={styles.headerTitle}>
|
||||||
{props.title}
|
{props.title}
|
||||||
</Text>
|
</Text>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
headerTitle: {
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: "bold",
|
|
||||||
color: '#3F3C42',
|
|
||||||
}
|
|
||||||
})
|
|
Loading…
Reference in new issue