PluginProbe
Elementor Website Builder – more than just a page builder / 3.29.2
Elementor Website Builder – more than just a page builder v3.29.2
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 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-widgets / elements / flexbox / flexbox.php

flexbox.php in Elementor Website Builder – more than just a page builder 3.29.2, at modules/atomic-widgets/elements/flexbox/flexbox.php

49 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\AtomicWidgets\Elements\Flexbox;
3
4 use Elementor\Modules\AtomicWidgets\Elements\Div_Block\Div_Block;
5 use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type;
6 use Elementor\Modules\AtomicWidgets\Styles\Style_Definition;
7 use Elementor\Modules\AtomicWidgets\Styles\Style_Variant;
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12
13 class Flexbox extends Div_Block {
14 public static function get_type() {
15 return 'e-flexbox';
16 }
17
18 public static function get_element_type(): string {
19 return 'e-flexbox';
20 }
21
22 public function get_title() {
23 return esc_html__( 'Flexbox', 'elementor' );
24 }
25
26 public function get_keywords() {
27 return [ 'ato', 'atom', 'atoms', 'atomic' ];
28 }
29
30 public function get_icon() {
31 return 'eicon-flexbox';
32 }
33
34 protected function define_base_styles(): array {
35 $display = String_Prop_Type::generate( 'flex' );
36 $flex_direction = String_Prop_Type::generate( 'row' );
37
38 return [
39 static::BASE_STYLE_KEY => Style_Definition::make()
40 ->add_variant(
41 Style_Variant::make()
42 ->add_prop( 'display', $display )
43 ->add_prop( 'flex-direction', $flex_direction )
44 ->add_prop( 'padding', $this->get_base_padding() )
45 ),
46 ];
47 }
48 }
49