/** * Inspector Controls */ // Setup the block const { __ } = wp.i18n; const { Component } = wp.element; // Import block components const { InspectorControls, BlockDescription, ColorPalette, PanelColorSettings, } = wp.editor; // Import Inspector components const { Toolbar, Button, PanelBody, PanelRow, FormToggle, RangeControl, SelectControl, ToggleControl, } = wp.components; /** * Create an Inspector Controls wrapper Component */ export default class Inspector extends Component { constructor( props ) { super( ...arguments ); } render() { // Setup the attributes const { attributes: { borderWidth, borderColor, borderRadius, backgroundColor, padding }, isSelected, className, setAttributes } = this.props; const onChangeBorderColor = value => setAttributes( { borderColor: value } ); const onChangeBackgroundColor = value => setAttributes( { backgroundColor: value } ); return ( this.props.setAttributes( { padding: value } ) } min={ 0 } max={ 20 } step={ 1 } /> this.props.setAttributes( { borderWidth: value } ) } min={ 0 } max={ 10 } step={ 1 } /> this.props.setAttributes( { borderRadius: value } ) } min={ 0 } max={ 20 } step={ 1 } /> { ( borderWidth > 0 ) && ( ) } ); } }