1import {ColorKey} from '@/constants/uiConst'; 2import React from 'react'; 3import {Pressable} from 'react-native'; 4import ThemeText from './themeText'; 5import rpx from '@/utils/rpx'; 6 7interface IButtonProps { 8 style?: any; 9 hitSlop?: number; 10 children: string; 11 fontColor?: ColorKey; 12 onPress?: () => void; 13} 14export default function (props: IButtonProps) { 15 const {children, onPress, fontColor, hitSlop} = props; 16 return ( 17 <Pressable 18 {...props} 19 hitSlop={hitSlop ?? rpx(28)} 20 onPress={onPress} 21 accessible 22 accessibilityLabel={children}> 23 <ThemeText fontColor={fontColor}>{children}</ThemeText> 24 </Pressable> 25 ); 26} 27