UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

38 lines (37 loc) 1.13 kB
import { jsx as _jsx } from "react/jsx-runtime"; import classNames from "classnames"; /** * Optional wrapper for menu items. Simple flex container with `8px` gap (no * background or other styling). * @example * // basic (vertical) menu * <Menu> * <a href="/"><Menu.Item>Home</Menu.Item></a> * <a href="/profile"><Menu.Item>Profile</Menu.Item></a> * <a href="/applications"><Menu.Item>Applications</Menu.Item></a> * </Menu> * @example * // horizontal (inline) menu with step icons * <Menu horizontal> * <a href="/step1"> * <Menu.Item> * <Icon.Step variant="completed" marginRight /> * Step 1 * </Menu.Item> * </a> * <a href="/step2" class="active" > * <Menu.Item> * <Icon.Step variant="active" marginRight /> * Step 1 * </Menu.Item> * </a> * [more steps...] * </Menu> */ const Menu = ({ horizontal = false, className, ...props })=>/*#__PURE__*/ _jsx("div", { ...props, className: classNames("bf-menu", className, { "bf-menu-horizontal": horizontal }) }); Menu.displayName = "Menu"; export default Menu;