const { __ } = wp.i18n; const { Fragment } = wp.element; const { InspectorControls, PanelColorSettings, } = wp.editor; const { PanelBody, RangeControl, TextControl, ToggleControl, } = wp.components; const MAX_POSTS_COLUMNS = 4; const Controls = ( props ) => { const { attributes, setAttributes } = props; const hasTables = Array.isArray( attributes.tables ) && attributes.tables.length; return ( setAttributes( { featured_text: value } ) } /> setAttributes( { columns } ) } /> setAttributes( { fullWidthButtons: ! attributes.fullWidthButtons } ) } /> setAttributes( { boxShadow: ! attributes.boxShadow } ) } /> ( setAttributes( { accent } ) ), label: __( 'Accent Color' ), }, { value: attributes.featuredAccent, onChange: ( featuredAccent ) => ( setAttributes( { featuredAccent } ) ), label: __( 'Featured Plan Accent Color' ), }, { value: attributes.textColor, onChange: ( textColor ) => ( setAttributes( { textColor } ) ), label: __( 'Text Color' ), }, { value: attributes.backgroundColor, onChange: ( backgroundColor ) => ( setAttributes( { backgroundColor } ) ), label: __( 'Background Color' ), }, ] } /> ); }; export default Controls;