Improved the responsiveness of the application for tablet as well

This commit is contained in:
Tiago Ribeiro
2023-10-19 10:19:33 +01:00
parent 171f328278
commit 57f2135848
8 changed files with 48 additions and 34 deletions

View File

@@ -85,7 +85,7 @@ export default function BatchCodeGenerator({user}: {user: User}) {
</Button>
{user && (user.type === "developer" || user.type === "owner") && (
<>
<div className="flex items-center justify-between">
<div className="flex -md:flex-row md:flex-col -md:items-center 2xl:flex-row 2xl:items-center justify-between gap-2">
<label className="font-normal text-base text-mti-gray-dim">Expiry Date</label>
<Checkbox isChecked={isExpiryDateEnabled} onChange={setIsExpiryDateEnabled}>
Enabled
@@ -108,30 +108,30 @@ export default function BatchCodeGenerator({user}: {user: User}) {
)}
<label className="font-normal text-base text-mti-gray-dim">Select the type of user they should be</label>
{user && (
<div className="grid grid-cols-2 gap-4">
<div className="grid -md:grid-cols-2 md:grid-cols-1 xl:grid-cols-2 gap-4 place-items-center">
<Button
className="w-44 md:w-48"
className="w-44 2xl:w-48"
variant="outline"
onClick={() => generateCode("student")}
disabled={emails.length === 0 || isLoading || !PERMISSIONS.generateCode.student.includes(user.type)}>
Student
</Button>
<Button
className="w-44 md:w-48"
className="w-44 2xl:w-48"
variant="outline"
onClick={() => generateCode("teacher")}
disabled={emails.length === 0 || isLoading || !PERMISSIONS.generateCode.teacher.includes(user.type)}>
Teacher
</Button>
<Button
className="w-44 md:w-48"
className="w-44 2xl:w-48"
variant="outline"
onClick={() => generateCode("admin")}
disabled={emails.length === 0 || isLoading || !PERMISSIONS.generateCode.admin.includes(user.type)}>
Admin
</Button>
<Button
className="w-44 md:w-48"
className="w-44 2xl:w-48"
variant="outline"
onClick={() => generateCode("owner")}
disabled={emails.length === 0 || isLoading || !PERMISSIONS.generateCode.owner.includes(user.type)}>