Skip to content

Commit

Permalink
Merge pull request #2364 from Expensify/Rory-FixSuccessIcon
Browse files Browse the repository at this point in the history
Fix success icon in ReportActionContextMenu
  • Loading branch information
johnmlee101 authored Apr 13, 2021
2 parents e572b16 + 44ffb0f commit f8ff884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ const propTypes = {

// Boolean whether to display the ArrowRight icon
shouldShowRightArrow: PropTypes.bool,

// A boolean flag that gives the icon a green fill if true
success: PropTypes.bool,
};

const defaultProps = {
shouldShowRightArrow: false,
wrapperStyle: {},
success: false,
};

const MenuItem = ({
Expand All @@ -37,6 +41,7 @@ const MenuItem = ({
title,
shouldShowRightArrow,
wrapperStyle,
success,
}) => (
<Pressable
onPress={onPress}
Expand All @@ -50,7 +55,7 @@ const MenuItem = ({
<>
<View style={styles.flexRow}>
<View style={styles.createMenuIcon}>
<Icon src={icon} fill={getIconFillColor(getButtonState(hovered, pressed))} />
<Icon src={icon} fill={getIconFillColor(getButtonState(hovered, pressed, success))} />
</View>
<View style={styles.justifyContentCenter}>
<Text style={[styles.createMenuText, styles.ml3]}>
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/report/ReportActionContextMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class ReportActionContextMenuItem extends Component {
icon={icon}
onPress={this.triggerPressAndUpdateSuccess}
wrapperStyle={styles.pr9}
success={this.state.success}
/>
)
);
Expand Down

0 comments on commit f8ff884

Please sign in to comment.