28 lines
741 B
Plaintext
28 lines
741 B
Plaintext
"use client";
|
|
import {
|
|
DropdownProvider
|
|
} from "./chunk-BV7BCS3N.mjs";
|
|
import {
|
|
useDropdown
|
|
} from "./chunk-IURKDIR4.mjs";
|
|
|
|
// src/dropdown.tsx
|
|
import React from "react";
|
|
import { Popover } from "@heroui/popover";
|
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
var Dropdown = (props) => {
|
|
const { children, ...otherProps } = props;
|
|
const context = useDropdown(otherProps);
|
|
const [menuTrigger, menu] = React.Children.toArray(children);
|
|
return /* @__PURE__ */ jsx(DropdownProvider, { value: context, children: /* @__PURE__ */ jsxs(Popover, { ...context.getPopoverProps(), children: [
|
|
menuTrigger,
|
|
menu
|
|
] }) });
|
|
};
|
|
Dropdown.displayName = "HeroUI.Dropdown";
|
|
var dropdown_default = Dropdown;
|
|
|
|
export {
|
|
dropdown_default
|
|
};
|