PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0-beta1
Elementor Website Builder – more than just a page builder v3.8.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
elementor / app / assets / js / ui / molecules / list-item.js

list-item.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at app/assets/js/ui/molecules/list-item.js

33 lines 693 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { pxToRem, arrayToClassName } from 'elementor-app/utils/utils.js';
2
3 export default function ListItem( props ) {
4 const baseClassName = 'eps-list__item',
5 classes = [ baseClassName, props.className ];
6
7 let style;
8
9 if ( Object.prototype.hasOwnProperty.call( props, 'padding' ) ) {
10 style = {
11 '--eps-list-item-padding': pxToRem( props.padding ),
12 };
13
14 classes.push( baseClassName + '--padding' );
15 }
16
17 return (
18 <li style={ style } className={ arrayToClassName( classes ) }>
19 { props.children }
20 </li>
21 );
22 }
23
24 ListItem.propTypes = {
25 className: PropTypes.string,
26 padding: PropTypes.string,
27 children: PropTypes.any.isRequired,
28 };
29
30 ListItem.defaultProps = {
31 className: '',
32 };
33