jrshikoku/components/ActionSheetComponents/StationDeteilView/StationInsideMapButton.tsx
2025-04-03 09:15:42 +00:00

44 lines
1.1 KiB
TypeScript

import { FC } from "react";
import { TouchableOpacity, View, Text, Linking } from "react-native";
type Props = {
navigate: (screen: string, params: { info: string; goTo: string; useShow: boolean }) => void;
address: string;
goTo: string;
useShow: boolean;
onExit: () => void;
};
export const 駅構内図:FC<Props> = (props) => {
const { navigate, address, goTo, useShow, onExit } = props;
const info = address.replace("/index.html", "/") + "/kounai_map.html";
return (
<TouchableOpacity
style={{
height: 50,
backgroundColor: "#888A85",
flexDirection: "column",
alignContent: "center",
alignItems: "center",
margin: 2,
}}
onPress={() => {
navigate("howto", { info, goTo, useShow });
onExit();
}}
onLongPress={() => Linking.openURL(info)}
>
<View style={{ flex: 1 }} />
<Text
style={{
color: "white",
textAlign: "center",
textAlignVertical: "center",
flex: 1,
}}
>
</Text>
<View style={{ flex: 1 }} />
</TouchableOpacity>
);
};