koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
33 lines (32 loc) • 885 B
JavaScript
"use client";
import { jsx as l } from "react/jsx-runtime";
import { useLocalTheme as p } from "css-vars-hook";
import { forwardRef as u, useMemo as d } from "react";
import x from "classnames";
import { useLinkRefs as R } from "../../internal/hooks/useLinkRefs.js";
import L from "./Layout.module.css.js";
const N = (r) => r === "fluid" ? "100%" : `${r}px`, h = u(
({ width: r = 1280, className: m, as: t = "div", children: i, gap: e = 16, base: o = 12, ...s }, n) => {
const { LocalRoot: f, ref: a } = p();
R(n, a);
const c = d(
() => ({ "container-width": N(r), base: o, gap: `${e}px` }),
[r, e, o]
);
return /* @__PURE__ */ l(
f,
{
...s,
theme: c,
as: t,
className: x(L.grid, m),
children: i
}
);
}
);
h.displayName = "Grid";
export {
h as Grid
};
//# sourceMappingURL=Grid.js.map