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.

51 lines
1.6 KiB

  1. import React, { Component, useContext, useState } from "react";
  2. import { StyleSheet, Text, TouchableOpacity, View, Dimensions } from "react-native";
  3. import { FontAwesome5 } from '@expo/vector-icons';
  4. import { MaterialIcons } from '@expo/vector-icons';
  5. import colors from "../config/colors";
  6. import { dimensions } from "../config/dimensions";
  7. import { Ionicons } from '@expo/vector-icons';
  8. function MenuItens({ item, onPress, icon }) {
  9. return (
  10. <TouchableOpacity onPress={onPress} style={[styles.item]}>
  11. <View style={{ flexDirection: "row", flex: 1, marginTop: 12 }}>
  12. <View style={{ flexDirection: "row", flex: 0.20 }}>
  13. <Ionicons name="md-rainy" size={24} color={colors.lightBlue} />
  14. </View>
  15. <View style={{ flexDirection: "row", flex: 0.70 }}>
  16. <Text style={[styles.text]}>{item.name}</Text>
  17. </View>
  18. <View
  19. style={{ flex: 0.10, alignSelf: "flex-start", flexDirection: "row" }}>
  20. <MaterialIcons name={icon} size={24} color={colors.lightBlue} />
  21. </View>
  22. </View>
  23. </TouchableOpacity>
  24. );
  25. };
  26. export default MenuItens;
  27. const styles = StyleSheet.create({
  28. container: {
  29. flex: 1,
  30. flexDirection: "row",
  31. alignSelf: "flex-end",
  32. backgroundColor: colors.white,
  33. },
  34. text: {
  35. color: colors.lightBlue,
  36. fontSize: 14,
  37. fontWeight: "bold",
  38. },
  39. item: {
  40. color: colors.lightBlue,
  41. fontSize: dimensions.text.tertiary,
  42. fontWeight: "bold",
  43. }
  44. });