You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
import React from "react"; |
|
import { View, Text } from "react-native"; |
|
import { connect } from "react-redux"; |
|
|
|
//style |
|
import tw from "tailwind-rn"; |
|
import fontSize from "../../../constants/fontSize"; |
|
import Colors from "../../../constants/Colors"; |
|
|
|
export const Header = ({ title, theme }) => { |
|
return ( |
|
<View style={tw("flex flex-row-reverse w-full items-center mt-5 mb-4")}> |
|
<Text |
|
style={[ |
|
tw("py-2.5 pr-2.5 pl-5"), |
|
{ |
|
fontSize: fontSize.base, |
|
color: theme === "light" ? Colors.theme1.white : Colors.theme1.black, |
|
backgroundColor: theme === 'light' ? Colors.theme1.black : Colors.theme1.white + 'dd', |
|
fontFamily : 'bold' |
|
}, |
|
]} |
|
> |
|
{title} |
|
</Text> |
|
<View style={{ width : '100%', backgroundColor : Colors.theme1.grayE3 + (theme === "light" ? "" : "55"), height : 2 }}></View> |
|
</View> |
|
); |
|
}; |
|
|
|
const mapStateToProps = (state) => ({ |
|
theme: state.publicApi.theme |
|
}); |
|
|
|
const mapDispatchToProps = {}; |
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Header);
|
|
|