UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

48 lines (43 loc) 1.19 kB
'use client'; 'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); const css = require('styled-system/css'); const show = require('../show/show.cjs'); function NavMenuLink(props) { const { as, ...nativeProps } = props; const hasAs = Boolean(as); const AsSub = as; return /* @__PURE__ */ jsxRuntime.jsx( "li", { className: css.css({ w: "full" }), children: /* @__PURE__ */ jsxRuntime.jsx( show.Show, { when: hasAs, fallback: /* @__PURE__ */ jsxRuntime.jsx( "a", { ...nativeProps, className: css.cx( nativeProps.className, css.css({ color: "action.navigation.initial", textStyle: "link", _hover: { color: "action.navigation.hover" } }) ) } ), children: hasAs && /* @__PURE__ */ jsxRuntime.jsx(AsSub, { ...nativeProps }) } ) } ); } exports.NavMenuLink = NavMenuLink;