You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
605 B

  1. import React from "react";
  2. import { View } from "react-native";
  3. import { MaterialCommunityIcons } from "@expo/vector-icons";
  4. import colors from "../config/colors";
  5. function Icon({
  6. name,
  7. size = 40,
  8. backgroundColor = colors.black,
  9. iconColor = colors.white,
  10. }) {
  11. return (
  12. <View
  13. style={{
  14. width: size,
  15. height: size,
  16. borderRadius: size / 2,
  17. backgroundColor,
  18. justifyContent: "center",
  19. alignItems: "center",
  20. }}
  21. >
  22. <MaterialCommunityIcons name={name} color={iconColor} size={size * 0.5} />
  23. </View>
  24. );
  25. }
  26. export default Icon;