StationDeteilViewの項目分離

This commit is contained in:
harukin-expo-dev-env
2025-04-03 09:15:42 +00:00
parent cd08fdc08b
commit 1a2d678ef3
6 changed files with 175 additions and 153 deletions

View File

@@ -0,0 +1,32 @@
import React, { FC } from "react";
import { Linking } from "react-native";
import { FontAwesome } from "@expo/vector-icons";
import { TicketBox } from "@/components/atom/TicketBox";
type Props = {
info: string;
address: string;
usePDFView: string;
navigate: (screen: string, params?: object) => void;
onExit: () => void;
goTo: string;
useShow: string;
};
export const StationTimeTableButton: FC<Props> = (props) => {
const { info, address, usePDFView, navigate, onExit, goTo, useShow } = props;
return (
<TicketBox
backgroundColor={"#8F5902"}
icon={<FontAwesome name="table" color="white" size={50} />}
flex={1}
onPressButton={() => {
usePDFView == "true"
? Linking.openURL(address)
: navigate("howto", { info, goTo, useShow });
onExit();
}}
onLongPressButton={() => Linking.openURL(address)}
>
</TicketBox>
);
};