Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17041 - migrate EmojiPickerMenuItem to PressableWithoutFeedback #20165

Merged
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/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