PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.7
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.7
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 / blocks / smart-lists / inspect.js

inspect.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.7, at src/blocks/smart-lists/inspect.js

88 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "@wordpress/i18n";
2 import { PanelBody } from "@wordpress/components";
3 import { usePanelBodyContext } from "../../context";
4 import { TabControls } from "../../components";
5
6 import {
7 SmartListsGeneralTab,
8 SmartListsStyleTab,
9 IconImageGeneralTab,
10 IconImageStyleTab,
11 ContentGeneralTab,
12 ContentStyleTab,
13 } from "./generalTab";
14
15 import { VisibilityTab, AdvancedTab } from "../shared/advancedTab";
16
17 const Inspector = ({ attributes, setAttributes }) => {
18 const { openPanel, togglePanelBody } = usePanelBodyContext();
19
20 return (
21 <>
22 <PanelBody
23 title={__("General", "post-carousel")}
24 opened={openPanel === "general"}
25 onToggle={() => togglePanelBody("general")}
26 initialOpen={true}
27 >
28 {openPanel === "general" && (
29 <TabControls
30 attributes={attributes}
31 setAttributes={setAttributes}
32 GeneralTab={SmartListsGeneralTab}
33 GeneralTabTitle="Presets"
34 StyleTab={SmartListsStyleTab}
35 />
36 )}
37 </PanelBody>
38
39 <PanelBody
40 title={__("Icon / Image", "post-carousel")}
41 opened={openPanel === "icon-image"}
42 onToggle={() => togglePanelBody("icon-image")}
43 >
44 {openPanel === "icon-image" && (
45 <TabControls
46 attributes={attributes}
47 setAttributes={setAttributes}
48 GeneralTab={IconImageGeneralTab}
49 StyleTab={IconImageStyleTab}
50 />
51 )}
52 </PanelBody>
53
54 <PanelBody
55 title={__("Content", "post-carousel")}
56 opened={openPanel === "content"}
57 onToggle={() => togglePanelBody("content")}
58 >
59 {openPanel === "content" && (
60 <TabControls
61 attributes={attributes}
62 setAttributes={setAttributes}
63 GeneralTab={ContentGeneralTab}
64 StyleTab={ContentStyleTab}
65 />
66 )}
67 </PanelBody>
68
69 <PanelBody
70 title={__("Advanced", "post-carousel")}
71 opened={openPanel === "advance"}
72 onToggle={() => togglePanelBody("advance")}
73 >
74 <TabControls
75 attributes={attributes}
76 setAttributes={setAttributes}
77 displayIcon={false}
78 initialTab="visibility"
79 VisibilityTab={VisibilityTab}
80 AdvancedTab={AdvancedTab}
81 />
82 </PanelBody>
83 </>
84 );
85 };
86
87 export default Inspector;
88