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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t