deprecated
4 months ago
advanced-spacer-control.js
4 months ago
block.json
1 month ago
edit.js
2 months ago
icon.svg
4 months ago
index.js
4 months ago
index.php
4 months ago
save.js
4 months ago
spacers.js
4 months ago
style.scss
1 week ago
transforms.js
4 months ago
advanced-spacer-control.js
31 lines
| 1 | import { __ } from '@wordpress/i18n'; |
| 2 | import { SelectControl } from '@wordpress/components'; |
| 3 | |
| 4 | const AdvancedSpacerControl = (props) => { |
| 5 | const { attributes, setAttributes } = props; |
| 6 | const { spaceType } = attributes; |
| 7 | return ( |
| 8 | <SelectControl |
| 9 | label={__('Space Type', 'vk-blocks')} |
| 10 | value={spaceType} |
| 11 | onChange={(value) => setAttributes({ spaceType: value })} |
| 12 | options={[ |
| 13 | { |
| 14 | value: 'height', |
| 15 | label: __('height', 'vk-blocks'), |
| 16 | }, |
| 17 | { |
| 18 | value: 'margin-top', |
| 19 | label: __('margin-top', 'vk-blocks'), |
| 20 | }, |
| 21 | { |
| 22 | value: 'margin-bottom', |
| 23 | label: __('margin-bottom', 'vk-blocks'), |
| 24 | }, |
| 25 | ]} |
| 26 | /> |
| 27 | ); |
| 28 | }; |
| 29 | |
| 30 | export default AdvancedSpacerControl; |
| 31 |