tidy up inspector controls

This commit is contained in:
Ray Elliott 2020-08-14 18:43:44 +01:00
parent c032afc07a
commit 0a3962690b
1 changed files with 26 additions and 23 deletions

View File

@ -100,7 +100,7 @@ registerBlockType('room-vw/iconify', {
return (
<Fragment>
<InspectorControls>
<PanelBody title="Icon settings">
<PanelBody title="Icon size">
<RangeControl
label={`Font size (${attributes.fontUnit})`}
value={attributes.fontSize}
@ -111,15 +111,6 @@ registerBlockType('room-vw/iconify', {
setAttributes({ fontSize: value });
}}
/>
<PanelRow></PanelRow>
<PanelRow>
<ToggleControl
label="Is isInline"
checked={attributes.isInline}
onChange={(state) => {
setAttributes({ isInline: state });
}}
/>
<ToggleControl
label="Use ems"
checked={attributes.fontUnit === 'em'}
@ -132,7 +123,19 @@ registerBlockType('room-vw/iconify', {
});
}}
/>
</PanelRow>
</PanelBody>
<PanelBody title="Icon variations">
<ToggleControl
label="Inline"
checked={attributes.isInline}
onChange={(state) => {
setAttributes({ isInline: state });
}}
/>
<p>Color</p>
<p>Rotate</p>
<p>Flip</p>
<p>Etc</p>
</PanelBody>
</InspectorControls>