| @@ -4,8 +4,9 @@ | ||
| 4 | 4 | use ABlocks\Controls\Icon; |
| 5 | 5 | use ABlocks\Controls\Border; |
| 6 | 6 | use ABlocks\Controls\Range; |
| 7 | 7 | use ABlocks\Components\ButtonGroup; |
| 8 | + | |
| 8 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | 10 | exit; |
| 10 | 11 | } |
| 11 | 12 | |
| @@ -13,12 +14,9 @@ | ||
| 13 | 14 | 'block_id' => array( |
| 14 | 15 | 'type' => 'string', |
| 15 | 16 | 'default' => '' |
| 16 | 17 | ), |
| 17 | - 'inputWidth' => [ | |
| 18 | - 'type' => 'number', | |
| 19 | - 'default' => 100 | |
| 20 | - ], | |
| 18 | + | |
| 21 | 19 | 'label' => [ |
| 22 | 20 | 'type' => 'string', |
| 23 | 21 | 'default' => '' |
| 24 | 22 | ], |
| @@ -111,8 +109,16 @@ | ||
| 111 | 109 | Range::get_attribute( [ |
| 112 | 110 | 'attributeName' => 'inputIconSpace', |
| 113 | 111 | 'isResponsive' => false, |
| 114 | 112 | 'defaultValue' => 38, |
| 113 | + ] ), | |
| 114 | + Range::get_attribute( [ | |
| 115 | + 'attributeName' => 'inputWidth', | |
| 116 | + 'attributeObjectKey' => 'value', | |
| 117 | + 'isResponsive' => true, | |
| 118 | + 'defaultValue' => 100, | |
| 119 | + 'hasUnit' => true, | |
| 120 | + 'unitDefaultValue' => '%', | |
| 115 | 121 | ] ), |
| 116 | 122 | ); |
| 117 | 123 | |
| 118 | 124 | return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |