PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 3.4.1
Block Animations, Motion & Scroll Effects – Ghost Kit v3.4.1
3.7.2 3.7.1 3.7.0 3.6.1 trunk 1.6.3 2.25.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.6.0
ghostkit / gutenberg / blocks / tabs / edit / inspector-controls.js

inspector-controls.js in Block Animations, Motion & Scroll Effects – Ghost Kit 3.4.1, at gutenberg/blocks/tabs/edit/inspector-controls.js

46 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { InspectorControls } from '@wordpress/block-editor';
2 import { PanelBody, SelectControl, ToggleControl } from '@wordpress/components';
3 import { __ } from '@wordpress/i18n';
4
5 export default function EditInspectorControls({ attributes, setAttributes }) {
6 const { trigger, buttonsAlign, buttonsVerticalAlign } = attributes;
7
8 return (
9 <InspectorControls>
10 <PanelBody>
11 <SelectControl
12 label={__('Select Tab Trigger', 'ghostkit')}
13 value={trigger}
14 options={[
15 {
16 value: '',
17 label: __('Click', 'ghostkit'),
18 },
19 {
20 value: 'hover',
21 label: __('Hover', 'ghostkit'),
22 },
23 ]}
24 onChange={(val) => {
25 setAttributes({ trigger: val });
26 }}
27 __next40pxDefaultSize
28 __nextHasNoMarginBottom
29 />
30 <ToggleControl
31 label={__('Vertical Tabs', 'ghostkit')}
32 checked={!!buttonsVerticalAlign}
33 onChange={(val) => {
34 setAttributes({ buttonsVerticalAlign: val });
35
36 if (val && buttonsAlign === 'stretch') {
37 setAttributes({ buttonsAlign: 'start' });
38 }
39 }}
40 __nextHasNoMarginBottom
41 />
42 </PanelBody>
43 </InspectorControls>
44 );
45 }
46