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 / live-filter / inspect.js

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

69 lines 1.8 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 { TabControls } from "../../components";
4 import { HeadingStyle, StyleTab } from "./styleTab";
5 import { GeneralTab, HeadingTab } from "./generalTab";
6 // import { useState } from "@wordpress/element";
7 import { AdvancedTab, VisibilityTab } from "../shared/advancedTab";
8 import { usePanelBodyContext } from "../../context";
9
10 const Inspector = ({ attributes, setAttributes }) => {
11 const { openPanel, togglePanelBody } = usePanelBodyContext();
12
13 return (
14 <>
15 <PanelBody
16 title={__("Smart Frontend Filter", "post-carousel")}
17 initialOpen={true}
18 opened={openPanel === "general"}
19 onToggle={() => togglePanelBody("general")}
20 >
21 {openPanel === "general" && (
22 <TabControls
23 attributes={attributes}
24 setAttributes={setAttributes}
25 GeneralTab={GeneralTab}
26 StyleTab={StyleTab}
27 />
28 )}
29 </PanelBody>
30
31 {attributes.layout === "layoutTwo" && (
32 <PanelBody
33 title={__("Heading", "post-carousel")}
34 initialOpen={true}
35 opened={openPanel === "heading"}
36 onToggle={() => togglePanelBody("heading")}
37 >
38 {openPanel === "heading" && (
39 <TabControls
40 attributes={attributes}
41 setAttributes={setAttributes}
42 GeneralTab={HeadingTab}
43 StyleTab={HeadingStyle}
44 />
45 )}
46 </PanelBody>
47 )}
48
49 <PanelBody
50 title={__("Advanced", "post-carousel")}
51 opened={openPanel === "advance"}
52 onToggle={() => togglePanelBody("advance")}
53 >
54 {openPanel === "advance" && (
55 <TabControls
56 attributes={attributes}
57 setAttributes={setAttributes}
58 GeneralTab={VisibilityTab}
59 AdvancedTab={AdvancedTab}
60 displayIcon={ false }
61 />
62 )}
63 </PanelBody>
64 </>
65 );
66 };
67
68 export default Inspector;
69