import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; export type MenuItem = { label: string; key: string; }; type SideMenuProps = { menuItems: MenuItem[]; selected: string; onSelect: (key: string) => void; }; export default function SideMenu({ menuItems, selected, onSelect }: SideMenuProps) { return ( {menuItems.map(item => ( onSelect(item.key)}> {item.label} ))} ); } const styles = StyleSheet.create({ sideMenu: { width: 180, backgroundColor: '#333', paddingTop: 40, paddingHorizontal: 16, }, menuItem: { paddingVertical: 16, borderRadius: 4, marginBottom: 8, }, menuItemSelected: { backgroundColor: '#555', }, menuText: { color: '#fff', fontSize: 18, }, });