37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
import React from "react";
|
|
import { View, Text, TouchableWithoutFeedback } from "react-native";
|
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
|
import { Linking } from "react-native";
|
|
export const DataFromButton = ({ i }) => {
|
|
const [station, se, time] = i.split(",");
|
|
return (
|
|
<TouchableWithoutFeedback
|
|
onPress={() => Linking.openURL(time)}
|
|
key={station}
|
|
>
|
|
<View style={{ flexDirection: "row" }}>
|
|
<View
|
|
style={{
|
|
padding: 8,
|
|
flexDirection: "row",
|
|
borderBottomWidth: 1,
|
|
borderBottomColor: "#f0f0f0",
|
|
flex: 1,
|
|
}}
|
|
>
|
|
<Text style={{ fontSize: 20 }}>{station}</Text>
|
|
<View style={{ flex: 1 }} />
|
|
<Text style={{ fontSize: 18 }}>
|
|
提供元
|
|
<MaterialCommunityIcons
|
|
name={"open-in-new"}
|
|
color="black"
|
|
size={20}
|
|
/>
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
</TouchableWithoutFeedback>
|
|
);
|
|
};
|