import { Content, Portal, Root, Trigger } from '@radix-ui/react-popover'
import { Stack } from 'tamagui'
import type { PopoverContentProps } from '@radix-ui/react-popover'
interface Props {
children: [React.ReactElement, React.ReactElement]
onOpenChange?: (open: boolean) => void
modal?: false
side?: PopoverContentProps['side']
sideOffset?: PopoverContentProps['sideOffset']
align?: PopoverContentProps['align']
alignOffset?: PopoverContentProps['alignOffset']
}
const Popover = (props: Props) => {
const { children, onOpenChange, modal, ...contentProps } = props
const [trigger, content] = children
return (
{trigger}
{content}
)
}
type ContentProps = {
children: React.ReactNode
}
const PopoverContent = (props: ContentProps) => {
const { children } = props
return (
{children}
)
}
Popover.Content = PopoverContent
export { Popover as Popover }
export type { Props as PopoverProps }