import React from 'react'; import { Text, StyleProp, ViewStyle } from 'react-native'; import styles from './styles'; import Touch from '../../Touch'; import { CustomIcon, TIconsName } from '../../CustomIcon'; import { useTheme } from '../../../theme'; interface IPasscodeButton { text?: string; icon?: TIconsName; disabled?: boolean; onPress?: Function; style?: StyleProp; } const Button = React.memo(({ style, text, disabled, onPress, icon }: IPasscodeButton) => { const { colors } = useTheme(); const press = () => onPress && onPress(text); return ( {icon ? : {text}} ); }); export default Button;