import { TouchableOpacity, View } from "react-native";
import { useResponsive } from "@/lib/responsive";

export const TextBox = (props) => {
  const { backgroundColor, flex, onPressButton, children } = props;
  const { verticalScale } = useResponsive();
  return (
    <TouchableOpacity
      style={{
        flex: flex,
        backgroundColor: backgroundColor,
        padding: 5,
        minHeight: verticalScale(70),
        alignItems: "center",
        alignContent: "center",
        margin: 2,
      }}
      onPress={onPressButton}
    >
      <View style={{ flex: 1 }} />
      {children}
      <View style={{ flex: 1 }} />
    </TouchableOpacity>
  );
};
