Skip to content
Merged
Show file tree
Hide file tree
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: 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