StateBoxとDataFromButtonをtsx化
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import React, { FC } from "react";
|
||||
import { View, Text, TouchableWithoutFeedback } from "react-native";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { Linking } from "react-native";
|
||||
export const DataFromButton: FC<{ i: string }> = ({ 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>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user