Skip to content

Commit dbe1fca

Browse files
ofgrenudoCopilotgauthier-th
authored
refactor(userlist): responsive columns and buttons (#2083)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: gauthier-th <mail@gauthierth.fr>
1 parent fb2ee7c commit dbe1fca

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

src/components/UserList/index.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -750,16 +750,19 @@ const UserList = () => {
750750
>
751751
{intl.formatMessage(messages.created)}
752752
</SortableColumnHeader>
753-
<Table.TH className="text-right">
753+
<Table.TH className="w-1/12 whitespace-nowrap text-right">
754754
{(data.results ?? []).length > 1 && (
755-
<Button
756-
buttonType="warning"
757-
onClick={() => setShowBulkEditModal(true)}
758-
disabled={selectedUsers.length === 0}
759-
>
760-
<PencilIcon />
761-
<span>{intl.formatMessage(messages.bulkedit)}</span>
762-
</Button>
755+
<div className="flex justify-end">
756+
<Button
757+
buttonType="warning"
758+
className="w-full sm:min-w-[12rem]"
759+
onClick={() => setShowBulkEditModal(true)}
760+
disabled={selectedUsers.length === 0}
761+
>
762+
<PencilIcon />
763+
<span>{intl.formatMessage(messages.bulkedit)}</span>
764+
</Button>
765+
</div>
763766
)}
764767
</Table.TH>
765768
</tr>
@@ -871,11 +874,13 @@ const UserList = () => {
871874
day: 'numeric',
872875
})}
873876
</Table.TD>
874-
<Table.TD alignText="right">
877+
<Table.TD
878+
alignText="right"
879+
className="grid grid-cols-1 gap-1 sm:grid-cols-2 sm:gap-2"
880+
>
875881
<Button
876882
buttonType="warning"
877883
disabled={user.id === 1 && currentUser?.id !== 1}
878-
className="mr-2"
879884
onClick={() =>
880885
router.push(
881886
'/users/[userId]/settings',

0 commit comments

Comments
 (0)