PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.4
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.4
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / src / components / componentsTopControl / ComponentsTopSection.js

ComponentsTopSection.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.4, at src/components/componentsTopControl/ComponentsTopSection.js

39 lines 931 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { memo } from "@wordpress/element";
2 import Responsive from "../responsive/responsive";
3 import { ResetButton, Units } from "../utility";
4
5 const ComponentsTopSection = ({
6 label,
7 units = false,
8 attributes,
9 setAttributes,
10 attributesKey = "",
11 onReset = false,
12 onUnitChange,
13 }) => {
14 return (
15 <div className="sp-smart-post-header-control sp-mb-8px">
16 <div className="sp-smart-post-header-control-left">
17 <span className="sp-smart-post-component-title">
18 {label}
19 </span>
20 {attributes?.device && <Responsive />}
21 </div>
22 {units && (
23 <div className="sp-smart-post-header-control-right">
24 {onReset && <ResetButton onClick={() => onReset()} />}
25 <Units
26 attributes={attributes}
27 setAttributes={setAttributes}
28 attributesKey={attributesKey}
29 units={units}
30 onUnitChange={onUnitChange}
31 />
32 </div>
33 )}
34 </div>
35 );
36 };
37
38 export default memo(ComponentsTopSection);
39