32 lines · 719 B · TypeScript
RawDownload
import { type ReactNode } from "react"; import { RIGHT_PANEL_SHEET_CLASS_NAME } from "../rightPanelLayout";import { Sheet, SheetPopup } from "./ui/sheet"; export function RightPanelSheet(props: {  animationDurationMs: number;  children: ReactNode;  open: boolean;  onClose: () => void;}) {  return (    <Sheet      open={props.open}      onOpenChange={(open) => {        if (!open) {          props.onClose();        }      }}    >      <SheetPopup        transitionDurationMs={props.animationDurationMs}        side="right"        showCloseButton={false}        keepMounted        className={RIGHT_PANEL_SHEET_CLASS_NAME}      >        {props.children}      </SheetPopup>    </Sheet>  );}