33 lines
685 B
JavaScript
33 lines
685 B
JavaScript
import { TouchableOpacity, Text } from "react-native";
|
|
|
|
export const TicketBox = (props) => {
|
|
const {
|
|
icon,
|
|
backgroundColor,
|
|
flex,
|
|
onPressButton,
|
|
children,
|
|
onLongPressButton,
|
|
} = props;
|
|
return (
|
|
<TouchableOpacity
|
|
style={{
|
|
flex: flex,
|
|
backgroundColor: backgroundColor,
|
|
borderColor: "#0099CC",
|
|
padding: 10,
|
|
borderWidth: 1,
|
|
margin: 2,
|
|
alignItems: "center",
|
|
}}
|
|
onPress={onPressButton}
|
|
onLongPress={onLongPressButton}
|
|
>
|
|
<Text style={{ color: "white", fontWeight: "bold", fontSize: 18 }}>
|
|
{children}
|
|
</Text>
|
|
{icon}
|
|
</TouchableOpacity>
|
|
);
|
|
};
|