UNPKG

@conduction/components

Version:

React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)

8 lines (7 loc) 727 B
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime"; import * as styles from "./SecondaryTopNav.module.css"; import { Link } from "@utrecht/component-library-react/dist/css-module"; import clsx from "clsx"; export const SecondaryTopNav = ({ items, layoutClassName }) => { return (_jsx("div", { className: clsx(styles.secondary, layoutClassName && layoutClassName), children: _jsx("nav", { children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, current, handleClick }, idx) => (_jsx("li", { className: clsx(styles.li, current && styles.current), onClick: handleClick, children: _jsxs(Link, { className: clsx(styles.link, styles.label), children: [icon, label] }) }, idx))) }) }) })); };