changeHandler( name, hex ) }
- />
+
+ { showUndoIcon && undoHandler( name ) } className="dashicons dashicons-undo"> }
+ {/* Handle settings color-picker field by using dynamic props */}
+ changeHandler(name, hex)}
+ />
+
- { needUpgrade && }
+ {needUpgrade && }
);
}
diff --git a/assets/src/components/settings/Panels/PanelSettings/TabPanels.js b/assets/src/components/settings/Panels/PanelSettings/TabPanels.js
index 8674dc25..13e12a99 100644
--- a/assets/src/components/settings/Panels/PanelSettings/TabPanels.js
+++ b/assets/src/components/settings/Panels/PanelSettings/TabPanels.js
@@ -2,16 +2,13 @@ import { Tabs } from "antd";
const { TabPane } = Tabs;
-const TabPanels = ( { tabPanels, activeTab, changeHandler, classes, undoHandler, showUndoIcon = false } ) => {
+const TabPanels = ( { tabPanels, activeTab, changeHandler, classes } ) => {
return (
// Handle settings tab & panels preview by using props.
)
- } }
>
{ tabPanels && tabPanels?.map( tab => (
diff --git a/assets/src/components/settings/Panels/PanelSettings/index.js b/assets/src/components/settings/Panels/PanelSettings/index.js
index 1db69094..cfe819f4 100644
--- a/assets/src/components/settings/Panels/PanelSettings/index.js
+++ b/assets/src/components/settings/Panels/PanelSettings/index.js
@@ -4,10 +4,8 @@ import TabPanels from "./TabPanels";
const PanelSettings = ( {
tabPanels,
activeTab,
- undoHandler,
changeHandler,
colSpan = 12,
- showUndoIcon = false
} ) => {
return (
// Handle settings column width dynamically by using colSpan.
@@ -16,8 +14,6 @@ const PanelSettings = ( {