Skip to content

Commit

Permalink
Merge pull request #20165 from Skalakid/17041-migrate-EmojiPickerMenu…
Browse files Browse the repository at this point in the history
…Item

17041 - migrate EmojiPickerMenuItem to PressableWithoutFeedback
  • Loading branch information
luacmartins authored Jun 6, 2023
2 parents 5739db4 + fd7cd57 commit beb9c0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/EmojiPicker/EmojiPickerMenuItem.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {Pressable} from 'react-native';
import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import getButtonState from '../../libs/getButtonState';
import Text from '../Text';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** The unicode that is used to display the emoji */
Expand Down Expand Up @@ -61,7 +61,7 @@ class EmojiPickerMenuItem extends PureComponent {

render() {
return (
<Pressable
<PressableWithoutFeedback
onPress={() => this.props.onPress(this.props.emoji)}
onHoverIn={this.props.onHoverIn}
onHoverOut={this.props.onHoverOut}
Expand All @@ -74,9 +74,11 @@ class EmojiPickerMenuItem extends PureComponent {
this.props.isHighlighted && !this.props.isUsingKeyboardMovement ? styles.emojiItemHighlighted : {},
styles.emojiItem,
]}
accessibilityLabel={this.props.emoji}
accessibilityRole="button"
>
<Text style={[styles.emojiText]}>{this.props.emoji}</Text>
</Pressable>
</PressableWithoutFeedback>
);
}
}
Expand Down

0 comments on commit beb9c0f

Please sign in to comment.