@bedrock-layout/stack
Version:
bedrock-layout stack layout primitive
2 lines (1 loc) • 506 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@bedrock-layout/spacing-constants"),d=require("@bedrock-layout/type-utils"),b=require("react"),S=d.forwardRefWithAs(function({as:e="div",gap:a,align:r,padding:n,style:i={},...s},c){const o=t.createAttributeString("align",r),u=t.getSafeGutter(a),g=t.getPaddingAttributes(n),l=[o,...g].filter(Boolean).join(" ");return b.createElement(e,{ref:c,"data-br-stack":l,style:{"--gap":u,...i},...s})});exports.Stack=S;