diff --git a/packages/design-system/src/popover.tsx b/packages/design-system/src/popover.tsx new file mode 100644 index 0000000..631fe8c --- /dev/null +++ b/packages/design-system/src/popover.tsx @@ -0,0 +1,84 @@ +import React, { forwardRef, ElementRef, ComponentPropsWithoutRef } from "react"; +import * as PopoverPrimitive from "@headlessui/react"; +import cn from "classnames"; + +const Popover = forwardRef< + ElementRef, + ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +PopoverPrimitive.Popover.displayName = "Popover"; + +const PopoverBackdrop = forwardRef< + ElementRef, + ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +PopoverPrimitive.PopoverBackdrop.displayName = "PopoverBackdrop"; + +const PopoverPanel = forwardRef< + ElementRef, + ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +PopoverPrimitive.PopoverPanel.displayName = "PopoverPanel"; + +const PopoverButton = forwardRef< + ElementRef, + ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +PopoverPrimitive.PopoverButton.displayName = "PopoverButton"; + +const PopoverGroup = forwardRef< + ElementRef, + ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +PopoverPrimitive.PopoverGroup.displayName = "PopoverGroup"; + +const CloseButton = forwardRef< + ElementRef, + ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +PopoverPrimitive.CloseButton.displayName = "CloseButton"; + +export { + Popover, + PopoverPanel, + PopoverBackdrop, + PopoverButton, + PopoverGroup, + CloseButton, +};