koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
43 lines (42 loc) • 874 B
JavaScript
"use client";
import { jsxs as p, jsx as n } from "react/jsx-runtime";
import { forwardRef as t } from "react";
import N from "classnames";
import s from "./Navigation.module.css.js";
const d = t(
({
title: a,
as: e = "a",
href: i,
icon: r,
shift: m = !1,
className: c,
isCurrent: o,
...l
}, f) => /* @__PURE__ */ p(
e,
{
...l,
ref: f,
title: a,
className: N(
s.navLink,
{
[s.shift]: m,
[s.current]: o
},
c
),
href: i,
children: [
r && /* @__PURE__ */ n("span", { children: /* @__PURE__ */ n(r, { className: s.navLinkIcon, title: a }) }),
/* @__PURE__ */ n("span", { className: s.navLinkTitle, children: a })
]
}
)
);
d.displayName = "NavLink";
export {
d as NavLink
};
//# sourceMappingURL=NavLink.js.map