@bedrock-layout/stack
Version:
bedrock-layout stack layout primitive
2 lines (1 loc) • 831 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,r,o){"use strict";function c(i,n){if(n!==void 0)return`${i}:${n}`}const s=r.forwardRefWithAs(function({as:n="div",gutter:u,gap:a,align:d,style:f={},...y},l){const p=e.useTheme(),k=c("align",d),b=e.getSafeGutter(p,a??u),m=[k].filter(Boolean).join(" ");return o.createElement(n,{ref:l,"data-br-stack":m,style:{"--gutter":b,...f},...y})});t.Stack=s,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});