UNPKG

@bedrock-layout/reel

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