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

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

48 lines 1.3 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 { PaginationGeneralTab } from "../shared/generalTab";
5 import { PaginationStyleTab } from "../shared/styleTab";
6 import { AdvancedTab, VisibilityTab } from "../shared/advancedTab";
7 import { useState } from "@wordpress/element";
8
9 const Inspector = ({ attributes, setAttributes }) => {
10 const [openPanel, setOpenPanel] = useState("general");
11 const toggleHandler = (value, panel) => {
12 if (value) {
13 setOpenPanel(panel);
14 } else {
15 setOpenPanel("");
16 }
17 };
18
19 return (
20 <>
21 <PanelBody title={__("Pagination", "post-carousel")} initialOpen={true}>
22 {/* <div className="sp-smart-post-single-inspector"> */}
23 <TabControls
24 attributes={attributes}
25 setAttributes={setAttributes}
26 GeneralTab={PaginationGeneralTab}
27 StyleTab={PaginationStyleTab}
28 />
29 {/* </div> */}
30 </PanelBody>
31 <PanelBody
32 title={__("Advanced", "post-carousel")}
33 opened={openPanel === "advance"}
34 onToggle={(value) => toggleHandler(value, "advance")}
35 >
36 <TabControls
37 attributes={attributes}
38 setAttributes={setAttributes}
39 GeneralTab={VisibilityTab}
40 AdvancedTab={AdvancedTab}
41 />
42 </PanelBody>
43 </>
44 );
45 };
46
47 export default Inspector;
48