MCPcopy Create free account
hub / github.com/arctic-cli/interface / SheetPopup

Function SheetPopup

packages/web/components/ui/sheet.tsx:60–108  ·  view source on GitHub ↗
({
  className,
  children,
  showCloseButton = true,
  side = "right",
  inset = false,
  ...props
}: SheetPrimitive.Popup.Props & {
  showCloseButton?: boolean;
  side?: "right" | "left" | "top" | "bottom";
  inset?: boolean;
})

Source from the content-addressed store, hash-verified

58}
59
60function SheetPopup({
61 className,
62 children,
63 showCloseButton = true,
64 side = "right",
65 inset = false,
66 ...props
67}: SheetPrimitive.Popup.Props & {
68 showCloseButton?: boolean;
69 side?: "right" | "left" | "top" | "bottom";
70 inset?: boolean;
71}) {
72 return (
73 <SheetPortal>
74 <SheetBackdrop />
75 <SheetViewport inset={inset} side={side}>
76 <SheetPrimitive.Popup
77 className={cn(
78 "relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover bg-clip-padding text-popover-foreground shadow-lg transition-[opacity,translate] duration-200 ease-in-out will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:before:hidden dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
79 side === "bottom" &&
80 "row-start-2 border-t data-ending-style:translate-y-8 data-starting-style:translate-y-8",
81 side === "top" &&
82 "data-ending-style:-translate-y-8 data-starting-style:-translate-y-8 border-b",
83 side === "left" &&
84 "data-ending-style:-translate-x-8 data-starting-style:-translate-x-8 w-[calc(100%-(--spacing(12)))] max-w-md border-e",
85 side === "right" &&
86 "col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s data-ending-style:translate-x-8 data-starting-style:translate-x-8",
87 inset &&
88 "before:hidden sm:rounded-2xl sm:border sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=sheet-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]",
89 className,
90 )}
91 data-slot="sheet-popup"
92 {...props}
93 >
94 {children}
95 {showCloseButton && (
96 <SheetPrimitive.Close
97 aria-label="Close"
98 className="absolute end-2 top-2"
99 render={<Button size="icon" variant="ghost" />}
100 >
101 <HugeiconsIcon icon={Cancel01Icon} />
102 </SheetPrimitive.Close>
103 )}
104 </SheetPrimitive.Popup>
105 </SheetViewport>
106 </SheetPortal>
107 );
108}
109
110function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
111 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected