TitleBar init commit

This commit is contained in:
moist-webDev 2023-05-26 00:12:34 -04:00
parent 95f04ead27
commit cf18bf8a04
1 changed files with 32 additions and 0 deletions

32
components/TitleBar.tsx Normal file
View File

@ -0,0 +1,32 @@
import { StyleSheet, Text, View} from 'react-native';
export default function TitleBar({ title='', theme={} }:any){
return (
<View style={style(theme).container}>
<Text style={style(theme).text}>{title}</Text>
</View>
)
}
const style = (theme:any) => {
return StyleSheet.create({
container: {
width: '100%',
backgroundColor: theme.background,
alignItems: 'center',
marginBottom: 20,
paddingTop: 40,
paddingBottom: 10,
shadowColor: '#52006A',
shadowOffset: {width: 0, height: 4},
shadowOpacity: 0.2,
shadowRadius: 3,
elevation: 20,
},
text: {
color: theme.text,
fontWeight: 'bold',
fontSize: 20,
},
});
}