PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 2.0.0
GenerateBlocks v2.0.0
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / blocks / query-page-numbers / components / BlockSettings.jsx
generateblocks / src / blocks / query-page-numbers / components Last commit date
BlockSettings.jsx 1 year ago
BlockSettings.jsx
63 lines
1 import { __ } from '@wordpress/i18n';
2 import { RangeControl } from '@wordpress/components';
3
4 import { OpenPanel } from '@edge22/components';
5
6 import {
7 ApplyFilters,
8 TagNameControl,
9 } from '@components/index.js';
10
11 export function BlockSettings( {
12 getStyleValue,
13 onStyleChange,
14 name,
15 attributes,
16 setAttributes,
17 } ) {
18 const {
19 midSize,
20 tagName,
21 } = attributes;
22
23 const panelProps = {
24 name,
25 attributes,
26 setAttributes,
27 };
28
29 return (
30 <ApplyFilters
31 name="generateblocks.editor.blockControls"
32 blockName={ name }
33 getStyleValue={ getStyleValue }
34 onStyleChange={ onStyleChange }
35 attributes={ attributes }
36 setAttributes={ setAttributes }
37 >
38 <OpenPanel
39 { ...panelProps }
40 panelId="settings"
41 >
42 <RangeControl
43 type="number"
44 label={ __( 'Mid Size', 'generateblocks' ) }
45 value={ midSize }
46 onChange={ ( value ) => setAttributes( { midSize: value } ) }
47 step="1"
48 min="0"
49 max="10"
50 />
51
52 <TagNameControl
53 blockName="generateblocks/query-page-numbers"
54 value={ tagName }
55 onChange={ ( value ) => {
56 setAttributes( { tagName: value } );
57 } }
58 />
59 </OpenPanel>
60 </ApplyFilters>
61 );
62 }
63