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

33 lines
934 B
TypeScript

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>
);
};