@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 1.01 kB
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}from"../helpers/extract-props.js";import{getSubtree as g}from"../helpers/get-subtree.js";import{heightPropDefs as D}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:m,height:i,minHeight:a,maxHeight:f,...P},l)=>{const{asChild:r,children:C,className:c,...y}=t(P,N,j,w),{className:d,style:h}=t({width:n,minWidth:s,maxWidth:m,height:i,minHeight:a,maxHeight:f},x,D);return o.createElement(r?v:"div",{...y,ref:l,className:e("rt-Container",c)},g({asChild:r,children:C},u=>o.createElement("div",{className:e("rt-ContainerInner",d),style:h},u)))});p.displayName="Container";export{p as Container};
//# sourceMappingURL=container.js.map