@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 1 kB
JavaScript
import*as o from"react";import t from"classnames";import{Slot as N}from"radix-ui";import{containerPropDefs as g}from"./container.props.js";import{extractProps as e}from"../helpers/extract-props.js";import{getSubtree as D}from"../helpers/get-subtree.js";import{heightPropDefs as R}from"../props/height.props.js";import{layoutPropDefs as j}from"../props/layout.props.js";import{marginPropDefs as w}from"../props/margin.props.js";import{widthPropDefs as x}from"../props/width.props.js";const p=o.forwardRef(({width:n,minWidth:s,maxWidth:i,height:m,minHeight:a,maxHeight:f,...P},l)=>{const{asChild:r,children:C,className:c,...y}=e(P,g,j,w),{className:d,style:h}=e({width:n,minWidth:s,maxWidth:i,height:m,minHeight:a,maxHeight:f},x,R),u=r?N.Root:"div";return o.createElement(u,{...y,ref:l,className:t("rt-Container",c)},D({asChild:r,children:C},v=>o.createElement("div",{className:t("rt-ContainerInner",d),style:h},v)))});p.displayName="Container";export{p as Container};
//# sourceMappingURL=container.js.map