Fix drawer not being scrollable

This commit is contained in:
Nicolas Mowen 2024-03-28 09:27:56 -06:00
parent 36d5e5b45f
commit afb15a2e54

View File

@ -27,19 +27,21 @@ export default function MobileCameraDrawer({
<FaVideo className="text-muted-foreground" /> <FaVideo className="text-muted-foreground" />
</Button> </Button>
</DrawerTrigger> </DrawerTrigger>
<DrawerContent className="max-h-[75dvh] overflow-y-auto flex flex-col items-center gap-2 px-4 pb-4 mx-1 rounded-t-2xl"> <DrawerContent className="max-h-[75dvh] px-4 pb-4 mx-1 rounded-t-2xl overflow-hidden">
{allCameras.map((cam) => ( <div className="w-full h-auto overflow-y-auto overflow-x-hidden flex flex-col items-center gap-2">
<div {allCameras.map((cam) => (
key={cam} <div
className={`w-full mx-4 py-2 text-center capitalize ${cam == selected ? "bg-secondary rounded-lg" : ""}`} key={cam}
onClick={() => { className={`w-full mx-4 py-2 text-center capitalize ${cam == selected ? "bg-secondary rounded-lg" : ""}`}
onSelectCamera(cam); onClick={() => {
setCameraDrawer(false); onSelectCamera(cam);
}} setCameraDrawer(false);
> }}
{cam.replaceAll("_", " ")} >
</div> {cam.replaceAll("_", " ")}
))} </div>
))}
</div>
</DrawerContent> </DrawerContent>
</Drawer> </Drawer>
); );