import type { ReactNode } from 'react'; import type { StyleProp, ViewStyle, TextStyle } from 'react-native'; export type GridMenuLayout = 'grid' | 'scroll'; export interface GridMenuItem { id: string | number; title: string; icon?: ReactNode; iconName?: string; iconFamily?: 'Ionicons' | 'FontAwesome' | 'MaterialIcons' | 'Entypo' | 'AntDesign'; iconColor?: string; iconSize?: number; badge?: string | number; badgeColor?: string; disabled?: boolean; onPress?: () => void; tag?: string; tagColor?: string; } export interface DbGridMenuProps { data: GridMenuItem[]; layout?: GridMenuLayout; columns?: number; title?: string; titleStyle?: StyleProp; showTitle?: boolean; rightText?: string; rightIcon?: ReactNode; rightIconName?: string; rightIconFamily?: 'Ionicons' | 'FontAwesome' | 'MaterialIcons' | 'Entypo' | 'AntDesign'; onRightPress?: () => void; style?: StyleProp; /** 标题区域样式 */ headerStyle?: StyleProp; itemStyle?: StyleProp; itemTextStyle?: StyleProp; gap?: number; padding?: number; /** 水平内边距(左右边距),默认 0 实现边缘对齐 */ horizontalPadding?: number; showDivider?: boolean; backgroundColor?: string; itemBackgroundColor?: string; itemRadius?: number; onItemPress?: (item: GridMenuItem) => void; }