Files
jrshikoku/components/Menu/TitleBar.tsx
harukin-expo-dev-env e8a2547ca4 tsx化
2025-12-05 10:43:57 +00:00

27 lines
773 B
TypeScript

import { View, TouchableOpacity, Linking,Platform, Image, useWindowDimensions } from "react-native";
import Constants from "expo-constants";
export const TitleBar = () => {
const { width } = useWindowDimensions();
return (
<View
style={{
alignItems: "center",
position: "absolute",
top: 0,
left: 0,
right: 0,
zIndex: 100,
paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight : 0,
}}
>
<TouchableOpacity
onPress={() => Linking.openURL("https://www.jr-shikoku.co.jp")}
>
<Image source={require("../../assets/Header.png")} style={{ width: width, resizeMode: "contain", backgroundColor: "white", height: 80 }} />
</TouchableOpacity>
</View>
);
};