StationDeteilViewの項目分離
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user