Skip to content

Commit

Permalink
Merge pull request #20290 from robertKozik/17056-migrate-banner
Browse files Browse the repository at this point in the history
17056 — migrate Banner to PressableWithFeedback
  • Loading branch information
mountiny authored Jun 12, 2023
2 parents a31e66d + 22e2192 commit 1f34b43
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit 1f34b43

Please sign in to comment.