Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/EmojiPicker/CategoryShortcutButton.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {Pressable} from 'react-native';
import Icon from '../Icon';
import Tooltip from '../Tooltip';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
Expand All @@ -9,6 +8,7 @@ import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import getButtonState from '../../libs/getButtonState';
import themeColors from '../../styles/themes/default';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** The emoji code of the category header */
Expand Down Expand Up @@ -37,7 +37,7 @@ class CategoryShortcutButton extends PureComponent {
text={this.props.translate(`emojiPicker.headers.${this.props.code}`)}
shiftVertical={-4}
>
<Pressable
<PressableWithoutFeedback
onPress={this.props.onPress}
onHoverIn={() => this.setState({isHighlighted: true})}
onHoverOut={() => this.setState({isHighlighted: false})}
Expand All @@ -46,14 +46,16 @@ class CategoryShortcutButton extends PureComponent {
styles.categoryShortcutButton,
this.state.isHighlighted && styles.emojiItemHighlighted,
]}
accessibilityLabel={`emojiPicker.headers.${this.props.code}`}
accessibilityRole="button"
>
<Icon
fill={themeColors.icon}
src={this.props.icon}
height={variables.iconSizeNormal}
width={variables.iconSizeNormal}
/>
</Pressable>
</PressableWithoutFeedback>
</Tooltip>
);
}
Expand Down