import * as React from 'react'; import { Content, Portal } from '@radix-ui/react-popover'; import { cn } from '#utils'; export type PopoverContentProps = { /** The preferred alignment against the anchor, which may change when collisions occur */ align?: 'center' | 'end' | 'start'; /** Change the default rendered element for the one passed as a child, merging their props and behavior */ asChild?: boolean; /** Whether the content should be automatically focused when opened (default = true) */ autofocus?: boolean; /** The content to display when the user opens the popover */ children: React.ReactNode; /** Additional CSS classes to add to the component, potentially overriding default styling */ className?: string; /** The distance in pixels from the viewport edges where collision detection should occur */ collisionPadding?: number; /** The distance in pixels from the anchor */ sideOffset?: number; }; export const PopoverContent = React.forwardRef, PopoverContentProps>( function PopoverContent( { align = 'center', asChild, autofocus = true, className, collisionPadding = 0, sideOffset = 4, ...props }, ref ) { return ( event.preventDefault() : undefined} {...props} /> ); } );