Skip to content

Commit

Permalink
align badge
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Jun 18, 2024
1 parent c0078d1 commit 2e066cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/SelectionList/Search/ActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import variables from '@styles/variables';
type ActionCellProps = {
onButtonPress: () => void;
action: string;
isLargeScreenWidth?: boolean;
};

function ActionCell({onButtonPress, action}: ActionCellProps) {
function ActionCell({onButtonPress, action, isLargeScreenWidth = true}: ActionCellProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const theme = useTheme();
Expand All @@ -26,7 +27,7 @@ function ActionCell({onButtonPress, action}: ActionCellProps) {
<Badge
text={translate(buttonTextKey)}
icon={Expensicons.Checkmark}
badgeStyles={[styles.ml0, styles.ph2, styles.gap1, StyleUtils.getBorderColorStyle(theme.border), StyleUtils.getHeight(variables.h20), StyleUtils.getMinimumHeight(variables.h20)]}
badgeStyles={[styles.ml0, styles.ph2, styles.gap1, isLargeScreenWidth ? styles.alignSelfCenter : styles.alignSelfEnd, StyleUtils.getBorderColorStyle(theme.border), StyleUtils.getHeight(variables.h20), StyleUtils.getMinimumHeight(variables.h20)]}
textStyles={StyleUtils.getFontSizeStyle(variables.fontSizeExtraSmall)}
iconStyles={styles.mr0}
success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function ExpenseItemHeaderNarrow({participantFrom, participantFromDisplayName, p
<ActionCell
onButtonPress={onButtonPress}
action={action}
isLargeScreenWidth={false}
/>
</View>
</View>
Expand Down

0 comments on commit 2e066cf

Please sign in to comment.