UNPKG

@stratakit/react

Version:

A React component library for StrataKit

38 lines (37 loc) 942 B
import { jsx } from "react/jsx-runtime"; import * as React from "react"; import { Icon as SkIcon } from "@stratakit/foundations"; import { DropdownMenu as SkDropdownMenu } from "@stratakit/structures"; import { useCompatProps } from "./~utils.js"; const MenuItem = React.forwardRef((props, forwardedRef) => { const { children, icon, startIcon = icon, disabled, // biome-ignore-start lint/correctness/noUnusedVariables: NOT IMPLEMENTED endIcon, value, sublabel, isSelected, focused, subMenuItems, size, badge, // biome-ignore-end lint/correctness/noUnusedVariables: NOT IMPLEMENTED ...rest } = useCompatProps(props); return /* @__PURE__ */ jsx( SkDropdownMenu.Item, { ...rest, label: children, icon: startIcon ? /* @__PURE__ */ jsx(SkIcon, { render: startIcon }) : void 0, disabled, ref: forwardedRef } ); }); export { MenuItem };