PluginProbe
Block Animations, Motion & Scroll Effects – Ghost Kit / 3.3.2
Block Animations, Motion & Scroll Effects – Ghost Kit v3.3.2
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 / icon / edit / inspector-controls.js

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

35 lines 869 B
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 {
3 __experimentalUnitControl as UnitControl,
4 PanelBody,
5 } from '@wordpress/components';
6 import { __ } from '@wordpress/i18n';
7
8 import IconPicker from '../../../components/icon-picker';
9
10 export default function EditInspectorControls({ attributes, setAttributes }) {
11 const { icon, width } = attributes;
12
13 return (
14 <InspectorControls>
15 <PanelBody>
16 <IconPicker
17 label={__('Icon', 'ghostkit')}
18 value={icon}
19 onChange={(value) => setAttributes({ icon: value })}
20 insideInspector
21 />
22 <UnitControl
23 label={__('Width', 'ghostkit')}
24 placeholder={__('Auto', 'ghostkit')}
25 value={width}
26 onChange={(val) => setAttributes({ width: val })}
27 labelPosition="edge"
28 __unstableInputWidth="70px"
29 min={0}
30 />
31 </PanelBody>
32 </InspectorControls>
33 );
34 }
35