@bedrock-layout/stack
Version:
bedrock-layout stack layout primitive
2 lines (1 loc) • 818 B
JavaScript
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("@bedrock-layout/spacing-constants"),require("@bedrock-layout/type-utils"),require("react")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","@bedrock-layout/type-utils","react"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.stack={},t.spacingConstants,t.typeUtils,t.React))})(this,(function(t,e,i,n){"use strict";const r=i.forwardRefWithAs(function({as:o="div",gap:a,align:c,padding:s,style:u={},...d},f){const l=e.createAttributeString("align",c),p=e.getSafeGutter(a),y=e.getPaddingAttributes(s),b=[l,...y].filter(Boolean).join(" ");return n.createElement(o,{ref:f,"data-br-stack":b,style:{"--gap":p,...u},...d})});t.Stack=r,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));