verdnatura-chat/app/containers/EmojiPicker/Footer.tsx

28 lines
1.0 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { View, TouchableOpacity } from 'react-native';
import { BorderlessButton } from 'react-native-gesture-handler';
import { useTheme } from '../../theme';
import { CustomIcon } from '../CustomIcon';
import styles from './styles';
import { IFooterProps } from './interfaces';
2022-06-28 14:41:52 +00:00
const BUTTON_HIT_SLOP = { top: 15, right: 15, bottom: 15, left: 15 };
2022-06-27 19:32:34 +00:00
const Footer = React.memo(({ onSearchPressed, onBackspacePressed }: IFooterProps) => {
const { colors } = useTheme();
return (
<View style={[styles.footerContainer, { backgroundColor: colors.bannerBackground }]}>
2022-06-27 19:32:34 +00:00
<BorderlessButton activeOpacity={0.7} onPress={onSearchPressed} style={styles.footerButtonsContainer}>
2022-06-28 14:41:52 +00:00
<CustomIcon color={colors.auxiliaryTintColor} size={25} name='search' />
</BorderlessButton>
2022-06-28 14:41:52 +00:00
<TouchableOpacity activeOpacity={0.7} onPress={onBackspacePressed} hitSlop={BUTTON_HIT_SLOP}>
<CustomIcon color={colors.auxiliaryTintColor} size={25} name='backspace' />
</TouchableOpacity>
</View>
);
});
export default Footer;