Skip to content

Commit

Permalink
fix: subject list modal scroll height
Browse files Browse the repository at this point in the history
  • Loading branch information
akshat-OwO committed Mar 22, 2024
1 parent 60dd768 commit e7cfab2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/modals/subject-list-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FC } from "react";
import SubjectList from "../SubjectList";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog";
import { Drawer, DrawerContent, DrawerHeader, DrawerTitle } from "../ui/drawer";
import { ScrollArea } from "../ui/scroll-area";

interface SubjectListModalProps {}

Expand All @@ -18,7 +19,9 @@ const SubjectListModal: FC<SubjectListModalProps> = ({}) => {
<DrawerHeader>
<DrawerTitle>Subjects</DrawerTitle>
</DrawerHeader>
<SubjectList.Data list={subjectList.subjectList} />
<ScrollArea type="scroll" tw="max-h-[75vh]">
<SubjectList.Data list={subjectList.subjectList} />
</ScrollArea>
</DrawerContent>
</Drawer>
);
Expand All @@ -30,7 +33,9 @@ const SubjectListModal: FC<SubjectListModalProps> = ({}) => {
<DialogHeader>
<DialogTitle>Subjects</DialogTitle>
</DialogHeader>
<SubjectList.Data list={subjectList.subjectList} />
<ScrollArea type="scroll" tw="max-h-[50vh]">
<SubjectList.Data list={subjectList.subjectList} />
</ScrollArea>
</DialogContent>
</Dialog>
);
Expand Down

0 comments on commit e7cfab2

Please sign in to comment.