Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
elementor
/
app
/
assets
/
js
/
ui
/
atoms
:
box.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import { arrayToClassName, pxToRem } from 'elementor-app/utils/utils.js'; import './box.scss'; export default function Box( props ) { const baseClassName = 'eps-box', classes = [ baseClassName, props.className ], style = {}; if ( Object.prototype.hasOwnProperty.call( props, 'padding' ) ) { style[ '--eps-box-padding' ] = pxToRem( props.padding ); classes.push( baseClassName + '--padding' ); } return ( <div style={ style } className={ arrayToClassName( classes ) }> { props.children } </div> ); } Box.propTypes = { className: PropTypes.string, padding: PropTypes.string, children: PropTypes.oneOfType( [ PropTypes.string, PropTypes.object, PropTypes.arrayOf( PropTypes.object ), ] ).isRequired, }; Box.defaultProps = { className: '', };