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

17056 — migrate Banner to PressableWithFeedback #20290

Merged
merged 1 commit into from
Jun 12, 2023
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
7 changes: 4 additions & 3 deletions src/components/Banner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {memo} from 'react';
import PropTypes from 'prop-types';
import {View, Pressable} from 'react-native';
import {View} from 'react-native';
import compose from '../libs/compose';
import Hoverable from './Hoverable';
import Icon from './Icon';
Expand All @@ -12,6 +12,7 @@ import * as StyleUtils from '../styles/StyleUtils';
import getButtonState from '../libs/getButtonState';
import Tooltip from './Tooltip';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import PressableWithFeedback from './Pressable/PressableWithFeedback';

const propTypes = {
/** Text to display in the banner. */
Expand Down Expand Up @@ -92,13 +93,13 @@ const Banner = (props) => (
</View>
{props.shouldShowCloseButton && (
<Tooltip text={props.translate('common.close')}>
<Pressable
<PressableWithFeedback
onPress={props.onClose}
accessibilityRole="button"
accessibilityLabel={props.translate('common.close')}
>
<Icon src={Expensicons.Close} />
</Pressable>
</PressableWithFeedback>
</Tooltip>
)}
</View>
Expand Down