forked from OpenNeo/impress
Matchu
81b2a2b4a2
We add jsbuilding-rails to get esbuild running in the app, and then we copy-paste the files we need from impress-2020 into here! I stopped at the point where it was building successfully, but it's not running correctly: it's not sure about `process.env` in `next`, and I think the right next step is to delete the NextJS deps altogether and use React Router instead.
30 lines
715 B
JavaScript
30 lines
715 B
JavaScript
import React from "react";
|
|
import {
|
|
Drawer,
|
|
DrawerBody,
|
|
DrawerContent,
|
|
DrawerCloseButton,
|
|
DrawerOverlay,
|
|
useBreakpointValue,
|
|
} from "@chakra-ui/react";
|
|
|
|
import { ItemPageContent } from "./ItemPage";
|
|
|
|
function ItemPageDrawer({ item, isOpen, onClose }) {
|
|
const placement = useBreakpointValue({ base: "bottom", lg: "right" });
|
|
|
|
return (
|
|
<Drawer placement={placement} size="md" isOpen={isOpen} onClose={onClose}>
|
|
<DrawerOverlay>
|
|
<DrawerContent>
|
|
<DrawerCloseButton />
|
|
<DrawerBody>
|
|
<ItemPageContent itemId={item.id} isEmbedded />
|
|
</DrawerBody>
|
|
</DrawerContent>
|
|
</DrawerOverlay>
|
|
</Drawer>
|
|
);
|
|
}
|
|
|
|
export default ItemPageDrawer;
|