PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.6
JetFormBuilder — Dynamic Blocks Form Builder v3.6.6
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 134 releases
jetformbuilder / modules / framework / blocks-style-manager / assets / src / components / control-section.jsx

control-section.jsx in JetFormBuilder — Dynamic Blocks Form Builder 3.6.6, at modules/framework/blocks-style-manager/assets/src/components/control-section.jsx

31 lines 803 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { PanelBody } from '@wordpress/components';
2 import { hasChildren } from '../helpers/utils';
3 import ControlComponent from './control-component';
4 import { isVisible, getContextFromProps } from '../helpers/conditions-checker';
5
6 const ControlSection = ( { section, props } ) => {
7
8 if ( section.condition && ! isVisible( section.condition, getContextFromProps( props ) ) ) {
9 return null;
10 }
11
12 return (
13 <PanelBody
14 title={ section.title }
15 initialOpen={ section.initialOpen }
16 className="crocoblock-style-manager__control-section"
17 >
18 { hasChildren( section ) && section.children.map( ( control ) => {
19 return (
20 <ControlComponent
21 key={ control.id }
22 control={ control }
23 props={ props }
24 />
25 );
26 } ) }
27 </PanelBody>
28 );
29 };
30
31 export default ControlSection;