駅メニューのコンポーネント化

This commit is contained in:
harukin-DeskMini
2022-10-08 18:43:40 +09:00
parent 7a33ee4095
commit 10b37d61db
5 changed files with 120 additions and 140 deletions

View File

@@ -0,0 +1,23 @@
import { TouchableOpacity, View } from "react-native";
export const TextBox = (props) => {
const { backgroundColor, flex, onPressButton, children } = props;
return (
<TouchableOpacity
style={{
flex: flex,
backgroundColor: backgroundColor,
padding: 10,
height: 70,
alignItems: "center",
alignContent: "center",
margin: 2,
}}
onPress={onPressButton}
>
<View style={{ flex: 1 }} />
{children}
<View style={{ flex: 1 }} />
</TouchableOpacity>
);
};