const { __ } = wp.i18n; const { Fragment } = wp.element; const { PanelBody, ToggleControl, } = wp.components; const { InspectorControls, PanelColorSettings, } = wp.editor; const Controls = ( props ) => { const { attributes, setAttributes } = props; return ( checked ? __( 'Showing accordion expanded by default.' ) : __( 'Show accordion collapsed by default.' ) } onChange={ () => setAttributes( { initialOpen: ! attributes.initialOpen } ) } /> setAttributes( { boxShadow: ! attributes.boxShadow } ) } /> ( setAttributes( { titleColor } ) ), label: __( 'Title Color' ), }, { value: attributes.titleBackgroundColor, onChange: ( titleBackgroundColor ) => ( setAttributes( { titleBackgroundColor } ) ), label: __( 'Title Background Color' ), }, { value: attributes.textColor, onChange: ( textColor ) => ( setAttributes( { textColor } ) ), label: __( 'Text Color' ), }, { value: attributes.backgroundColor, onChange: ( backgroundColor ) => ( setAttributes( { backgroundColor } ) ), label: __( 'Background Color' ), }, ] } /> ); }; export default Controls;