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