import { Colors } from "@/constants/Colors"; import { TabItem } from "@/services/base"; import { Image } from "expo-image"; import React from "react"; import { StyleSheet, Text, TouchableOpacity, View } from "react-native"; // 小程序 item 宽度 162rpx = 81pt const ITEM_WIDTH = 81; interface QuickEntryProps { data: TabItem[]; onPress?: (item: TabItem) => void; } export function QuickEntry({ data, onPress }: QuickEntryProps) { return ( {data.map((item, index) => ( onPress?.(item)} > {item.title} ))} ); } const styles = StyleSheet.create({ container: { width: "100%", marginTop: 10, marginBottom: 5, paddingHorizontal: 10, }, center: { width: "100%", flexDirection: "row", flexWrap: "wrap", justifyContent: "space-around", }, item: { width: ITEM_WIDTH, alignItems: "center", }, itemBox: { alignItems: "center", // Glow effect for icons shadowColor: Colors.neonBlue, shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.3, shadowRadius: 5, }, icon: { width: 48, // Reduced slightly from ITEM_WIDTH to fit better height: 48, marginBottom: 4, }, title: { fontSize: 11, fontWeight: "500", color: Colors.textSecondary, textShadowColor: "rgba(0, 243, 255, 0.3)", textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 3, }, });