29 lines
776 B
TypeScript
29 lines
776 B
TypeScript
import React, { FC } from "react";
|
|
import { Linking } from "react-native";
|
|
import { Foundation } from "@expo/vector-icons";
|
|
import { TicketBox } from "@/components/atom/TicketBox";
|
|
type Props = {
|
|
navigate: (screen: string, params: any) => void;
|
|
info: string;
|
|
goTo: string;
|
|
useShow: string;
|
|
onExit: () => void;
|
|
};
|
|
export const WebSiteButton: FC<Props> = (Props) => {
|
|
const { navigate, info, goTo, useShow, onExit } = Props;
|
|
return (
|
|
<TicketBox
|
|
backgroundColor={"#AD7FA8"}
|
|
icon={<Foundation name="web" color="white" size={50} />}
|
|
flex={1}
|
|
onPressButton={() => {
|
|
navigate("howto", { info, goTo, useShow });
|
|
onExit();
|
|
}}
|
|
onLongPressButton={() => Linking.openURL(info)}
|
|
>
|
|
web
|
|
</TicketBox>
|
|
);
|
|
};
|