1 |
- var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a};import React from'react';import Module from'../Module';const UNIT_REGEX=/[A-Z]/g;class Container extends Module{constructor(a){super(a),this.state={children:[]},this.mode=a._mode}render(){let a=this.background.value||'',b=this.width.value?this.width.value:'auto',c=this.height.value?this.height.value:'auto';return React.createElement('div',{className:`container ${Object.getPrototypeOf(this)===Container.prototype?this.props.className||this.ClassName.value:''}`,style:_extends({background:a,width:b,height:c,padding:''+this.Padding.value},this.props.style)},super.render())}}Container.EditPosition='top-left',Container.Inputs=_extends({},Module.Inputs,{ClassName:{type:Module.Types.Text,required:!1,comment:'ClassName'},width:{type:Module.Types.Text,required:!0,defaultValue:'auto'},height:{type:Module.Types.Text,required:!1,defaultValue:'auto',comment:'Setting this comment here to show the power!'},background:{type:Module.Types.Text,required:!1,comment:'Setting bg color!'},Padding:{type:Module.Types.Text}}),Container.Outputs={custom:{}},Container.Category='Basic';export default Container;
|