PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.1
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
give / src / DonorDashboards / resources / js / block / edit / inspector.js

inspector.js in GiveWP – Donation Plugin and Fundraising Platform 4.16.1, at src/DonorDashboards/resources/js/block/edit/inspector.js

44 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* eslint-disable no-unused-vars */
2
3 /**
4 * WordPress dependencies
5 */
6 import { __ } from '@wordpress/i18n'
7 const {InspectorControls} = wp.blockEditor;
8 const {PanelBody, ToggleControl} = wp.components;
9
10 /* eslint-disable-next-line no-undef */
11 const editorColorPalette = giveProgressBarThemeSupport.editorColorPalette;
12
13 import ColorControl from '../color-control';
14
15 /**
16 * Render Inspector Controls
17 */
18
19 const Inspector = ({attributes, setAttributes}) => {
20 // eslint-disable-next-line camelcase
21 const {accent_color} = attributes;
22 const saveSetting = (name, value) => {
23 setAttributes({
24 [name]: value,
25 });
26 };
27 return (
28 <InspectorControls key="inspector">
29 <PanelBody title={__('Appearance', 'give')} initialOpen={true}>
30 <ColorControl
31 colors={editorColorPalette}
32 name="color"
33 label={__('Accent Color', 'give')}
34 onChange={(value) => saveSetting('accent_color', value)}
35 // eslint-disable-next-line camelcase
36 value={accent_color}
37 />
38 </PanelBody>
39 </InspectorControls>
40 );
41 };
42
43 export default Inspector;
44