@premieroctet/next-admin
Version:
Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje
43 lines (42 loc) • 2.48 kB
JavaScript
import { jsx } from "react/jsx-runtime";
import { Content, Item, Label, Portal, Root, Separator, Trigger } from "@radix-ui/react-dropdown-menu";
import external_clsx_default from "clsx";
import { forwardRef } from "react";
import { twMerge } from "tailwind-merge";
const Dropdown = Root;
const DropdownTrigger = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsx(Trigger, {
className: external_clsx_default("focus:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0", className),
ref: ref,
...props,
children: children
}));
DropdownTrigger.displayName = "DropdownTrigger";
const DropdownBody = (props)=>/*#__PURE__*/ jsx(Portal, {
...props
});
DropdownBody.displayName = "DropdownBody";
const DropdownContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Content, {
className: twMerge(external_clsx_default("bg-nextadmin-background-default dark:bg-dark-nextadmin-background-subtle z-50 rounded-md shadow-lg focus:outline-none focus:ring-0", className)),
ref: ref,
...props
}));
DropdownContent.displayName = "DropdownContent";
const DropdownItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Item, {
className: twMerge(external_clsx_default("text-nextadmin-content-inverted dark:text-dark-nextadmin-content-inverted dark:hover:bg-dark-nextadmin-background-muted hover:bg-nextadmin-background-muted group text-sm focus:outline-none focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0", className)),
ref: ref,
...props
}));
DropdownItem.displayName = "DropdownItem";
const DropdownLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Label, {
className: twMerge(external_clsx_default("group text-sm font-medium text-gray-900", className)),
ref: ref,
...props
}));
DropdownLabel.displayName = "DropdownLabel";
const DropdownSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
className: twMerge(external_clsx_default("bg-nextadmin-border-strong dark:bg-dark-nextadmin-border-strong m-1 h-px", className)),
ref: ref,
...props
}));
DropdownSeparator.displayName = "DropdownSeparator";
export { Dropdown, DropdownBody, DropdownContent, DropdownItem, DropdownLabel, DropdownSeparator, DropdownTrigger };