import { useContext } from "react";
import { AppContext, AppStyles } from "../../utils";
import { Text, View } from "react-native";
import MyIcon from "../Icon";

export default function MyResult({ text, iconName }) {
  const appContext = useContext(AppContext);

  return (
    <View
      style={{
        alignItems: "center",
        marginTop: 40,
      }}
    >
      <MyIcon name={iconName} size={64} />
      <Text
        style={[
          AppStyles.typography16,
          {
            color: appContext.appTheme.text,
            marginTop: 10,
            textAlign: "center",
          },
        ]}
      >
        {text}
      </Text>
    </View>
  );
}
