17 lines
500 B
TypeScript
17 lines
500 B
TypeScript
import type { CommonProps } from "../../utils/common-props";
|
|
import { PopoverContext } from "./use-popover-context";
|
|
import { usePopoverFloating } from "./use-popover-floating";
|
|
|
|
export type PopoverProps = CommonProps & {};
|
|
|
|
export const Popover = (props: PopoverProps) => {
|
|
const { children } = props;
|
|
const popoverFloatingContext = usePopoverFloating();
|
|
|
|
return (
|
|
<PopoverContext.Provider value={popoverFloatingContext}>
|
|
<div>{children}</div>
|
|
</PopoverContext.Provider>
|
|
);
|
|
};
|