PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.8
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.8
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 / post-list-one / inspect.js

inspect.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.8, at src/blocks/post-list-one/inspect.js

52 lines 1.5 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 SharedInspectors from "../shared/inspectors";
4 import { Divider, PostListGeneralTab } from "./generalTab";
5 import { usePanelBodyContext } from "../../context";
6
7 const Inspector = ({ attributes, setAttributes, isSelected }) => {
8 // const { togglePanelBody, openedAccordion } = manageOpenAccordion();
9 const { openPanel, togglePanelBody } = usePanelBodyContext();
10
11 return (
12 <>
13 <PanelBody
14 title={__("General", "post-carousel")}
15 opened={openPanel === "general"}
16 onToggle={() => togglePanelBody("general")}
17 initialOpen={true}
18 >
19 {openPanel === "general" && (
20 <PostListGeneralTab attributes={attributes} setAttributes={setAttributes} />
21 )}
22 </PanelBody>
23
24 <PanelBody
25 title={__("Divider", "post-carousel")}
26 opened={openPanel === "divider"}
27 onToggle={() => togglePanelBody("divider")}
28 >
29 <Divider attributes={attributes} setAttributes={setAttributes} />
30 </PanelBody>
31 {/* <PanelBody
32 title={ __( 'Separator', 'post-carousel' ) }
33 opened={ openPanel === 'separator' }
34 onToggle={ () => togglePanelBody( 'separator' ) }
35 >
36 <PostListSeparatorGeneralTab
37 attributes={ attributes }
38 setAttributes={ setAttributes }
39 />
40 </PanelBody> */}
41 <SharedInspectors
42 attributes={attributes}
43 setAttributes={setAttributes}
44 togglePanelBody={togglePanelBody}
45 openedAccordion={openPanel}
46 />
47 </>
48 );
49 };
50
51 export default Inspector;
52