@bedrock-layout/reel
Version:
bedrock-layout reel
23 lines (22 loc) • 608 B
JavaScript
import { useTheme as s, getSafeGutter as l } from "@bedrock-layout/spacing-constants";
import { forwardRefWithAs as p } from "@bedrock-layout/type-utils";
import d from "react";
function b(e, t) {
if (t !== void 0)
return `${e}:${t}`;
}
const y = p(function({ as: t = "div", snapType: r, gutter: o, gap: n, style: i = {}, ...a }, f) {
const m = s(), u = l(m, n ?? o), c = [b("snapType", r)].filter(Boolean).join(" ");
return /* @__PURE__ */ d.createElement(
t,
{
ref: f,
"data-br-reel": c,
style: { "--gutter": u, ...i },
...a
}
);
});
export {
y as Reel
};