koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
36 lines (35 loc) • 1.02 kB
JavaScript
"use client";
import { jsxs as p, jsx as c } from "react/jsx-runtime";
import { forwardRef as d, useMemo as v, Children as N, cloneElement as u } from "react";
import h from "classnames";
import { useIsOverflow as P } from "../../internal/hooks/useIsOverflow.js";
import { useInternalRef as w } from "../../internal/hooks/useInternalRef.js";
import a from "./Navigation.module.css.js";
import { NavBrand as x } from "./NavBrand.js";
const y = d(
({ children: r, className: l, name: e = "Koval App", sticky: t, ...m }, n) => {
const o = w(n), { overflowX: s } = P(o), i = v(
() => N.toArray(r).map(
(f) => u(f, { collapsed: s })
),
[r, s]
);
return /* @__PURE__ */ p(
"div",
{
...m,
className: h(a.navPanel, { [a.sticky]: t }, l),
ref: o,
children: [
e && /* @__PURE__ */ c(x, { children: e }),
i
]
}
);
}
);
y.displayName = "NavPanel";
export {
y as NavPanel
};
//# sourceMappingURL=NavPanel.js.map