HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/globfdxw/www/wp-content/plugins/give/src/DonorDashboards/resources/js/block/edit/inspector.js
/* eslint-disable no-unused-vars */

/**
 * WordPress dependencies
 */
import { __ } from '@wordpress/i18n'
const {InspectorControls} = wp.blockEditor;
const {PanelBody, ToggleControl} = wp.components;

/* eslint-disable-next-line no-undef */
const editorColorPalette = giveProgressBarThemeSupport.editorColorPalette;

import ColorControl from '../color-control';

/**
 * Render Inspector Controls
 */

const Inspector = ({attributes, setAttributes}) => {
    // eslint-disable-next-line camelcase
    const {accent_color} = attributes;
    const saveSetting = (name, value) => {
        setAttributes({
            [name]: value,
        });
    };
    return (
        <InspectorControls key="inspector">
            <PanelBody title={__('Appearance', 'give')} initialOpen={true}>
                <ColorControl
                    colors={editorColorPalette}
                    name="color"
                    label={__('Accent Color', 'give')}
                    onChange={(value) => saveSetting('accent_color', value)}
                    // eslint-disable-next-line camelcase
                    value={accent_color}
                />
            </PanelBody>
        </InspectorControls>
    );
};

export default Inspector;