Files
dg-js-workspace/packages/ui-react/src/components/popover/popover.tsx
T
2026-11-24 16:17:45 +08:00

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>
);
};