Skip to content

Commit

Permalink
Merge pull request #49760 from Expensify/aldo_revert-style-change
Browse files Browse the repository at this point in the history
[CP Staging] Fix style change

(cherry picked from commit de984f7)

(CP triggered by AndrewGable)
  • Loading branch information
aldo-expensify authored and OSBotify committed Sep 26, 2024
1 parent 6350bbd commit 23ec850
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions src/pages/workspace/WorkspaceMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -536,31 +536,27 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson
if (!isPolicyAdmin) {
return null;
}
return (
<View style={[styles.flexRow, styles.gap2, shouldUseNarrowLayout && styles.mb3]}>
{(shouldUseNarrowLayout ? canSelectMultiple : selectedEmployees.length > 0) ? (
<ButtonWithDropdownMenu<WorkspaceMemberBulkActionType>
shouldAlwaysShowDropdownMenu
pressOnEnter
customText={translate('workspace.common.selected', {selectedNumber: selectedEmployees.length})}
buttonSize={CONST.DROPDOWN_BUTTON_SIZE.MEDIUM}
onPress={() => null}
options={getBulkActionsButtonOptions()}
isSplitButton={false}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedEmployees.length}
/>
) : (
<Button
success
onPress={inviteUser}
text={translate('workspace.invite.member')}
icon={Expensicons.Plus}
innerStyles={[shouldUseNarrowLayout && styles.alignItemsCenter]}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
/>
)}
</View>
return (shouldUseNarrowLayout ? canSelectMultiple : selectedEmployees.length > 0) ? (
<ButtonWithDropdownMenu<WorkspaceMemberBulkActionType>
shouldAlwaysShowDropdownMenu
pressOnEnter
customText={translate('workspace.common.selected', {selectedNumber: selectedEmployees.length})}
buttonSize={CONST.DROPDOWN_BUTTON_SIZE.MEDIUM}
onPress={() => null}
options={getBulkActionsButtonOptions()}
isSplitButton={false}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedEmployees.length}
/>
) : (
<Button
success
onPress={inviteUser}
text={translate('workspace.invite.member')}
icon={Expensicons.Plus}
innerStyles={[shouldUseNarrowLayout && styles.alignItemsCenter]}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
/>
);
};

Expand Down

0 comments on commit 23ec850

Please sign in to comment.