Skip to content

Commit

Permalink
feat: add a button wrapper to consolidate UI accross mobile viewports
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodallacqua-hpe committed Sep 26, 2024
1 parent 26510e5 commit ed3afb6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
3 changes: 2 additions & 1 deletion webui/react/src/pages/Admin/UserManagement.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
}

@media only screen and (max-width: $breakpoint-tablet-large) {
.selectWrapper {
.selectWrapper,
.buttonWrapper {
width: 100%;
}
}
34 changes: 18 additions & 16 deletions webui/react/src/pages/Admin/UserManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -522,22 +522,24 @@ const UserManagement: React.FC<Props> = ({ onUserCreate }: Props) => {
</div>
</Row>
</Column>
<Column align="right">
<Row>
{selectedUserIds.length > 0 && (
<Dropdown menu={actionDropdownMenu} onClick={handleActionDropdown}>
<Button data-testid="actions">Actions</Button>
</Dropdown>
)}
<Button
aria-label={CREATE_USER_LABEL}
data-testid="addUser"
disabled={!info.userManagementEnabled || !canModifyUsers}
onClick={CreateUserModal.open}>
{CREATE_USER}
</Button>
</Row>
</Column>
<div className={css.buttonWrapper}>
<Column align="right">
<Row>
{selectedUserIds.length > 0 && (
<Dropdown menu={actionDropdownMenu} onClick={handleActionDropdown}>
<Button data-testid="actions">Actions</Button>
</Dropdown>
)}
<Button
aria-label={CREATE_USER_LABEL}
data-testid="addUser"
disabled={!info.userManagementEnabled || !canModifyUsers}
onClick={CreateUserModal.open}>
{CREATE_USER}
</Button>
</Row>
</Column>
</div>
</Row>
</div>
{settings ? (
Expand Down

0 comments on commit ed3afb6

Please sign in to comment.