import React from 'react'; import { Pressable, Platform } from 'react-native'; import ToolTipMenu from './TooltipMenu'; import { useTheme } from './themes'; import { Icon } from '@rneui/themed'; import { Action } from './types'; interface HeaderMenuButtonProps { onPressMenuItem: (id: string) => void; actions?: Action[] | Action[][]; disabled?: boolean; } const HeaderMenuButton: React.FC = ({ onPressMenuItem, actions, disabled }) => { const { colors } = useTheme(); const styleProps = Platform.OS === 'android' ? { iconStyle: { transform: [{ rotate: '90deg' }] } } : {}; if (!actions || actions.length === 0) { return ( [{ opacity: pressed ? 0.5 : 1 }]} > ); } const menuActions = Array.isArray(actions[0]) ? (actions as Action[][]) : (actions as Action[]); return ( ); }; export default HeaderMenuButton;