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 / post-slider-two / inspect.js

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

88 lines 2.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 { TabControls } from "../../components";
4 import { PostSliderTwoLayoutTab, PostSliderTwoSliderTab } from "./generalTab";
5 import SharedInspectors from "../shared/inspectors";
6 import { usePanelBodyContext } from "../../context";
7
8 const Inspector = ({ attributes, setAttributes }) => {
9 // const { togglePanelBody, openedAccordion } = manageOpenAccordion();
10 const { openPanel, togglePanelBody } = usePanelBodyContext();
11 const {
12 // postSliderTwoNavArrow,
13 // postSliderTwoPaginationDot
14 } = attributes;
15
16 return (
17 <>
18 <PanelBody
19 title={__("Post Slider", "post-carousel")}
20 opened={openPanel === "general"}
21 onToggle={() => togglePanelBody("general")}
22 initialOpen={true}
23 >
24 {openPanel === "general" && (
25 <TabControls
26 attributes={attributes}
27 setAttributes={setAttributes}
28 GeneralTab={PostSliderTwoLayoutTab}
29 SliderTab={PostSliderTwoSliderTab}
30 />
31 )}
32 </PanelBody>
33 {/* { postSliderTwoNavArrow && (
34 <PanelBody
35 title={ __( 'Navigation Arrow', 'post-carousel' ) }
36 opened={ openPanel === 'navigation' }
37 onToggle={ () => togglePanelBody( 'navigation' ) }
38 >
39 { openPanel === 'navigation' && (
40 <TabControls
41 attributes={ attributes }
42 setAttributes={ setAttributes }
43 GeneralTab={ CarouselNavArrowGeneralTab }
44 StyleTab={ CarouselNavArrowStyleTab }
45 />
46 ) }
47 </PanelBody>
48 ) }
49 { postSliderTwoPaginationDot && (
50 <PanelBody
51 title={ __( 'Pagination Dots', 'post-carousel' ) }
52 opened={ openPanel === 'pagination' }
53 onToggle={ () => togglePanelBody( 'pagination' ) }
54 >
55 { openPanel === 'pagination' && (
56 <TabControls
57 attributes={ attributes }
58 setAttributes={ setAttributes }
59 GeneralTab={ CarouselPaginationGeneralTab }
60 StyleTab={ CarouselPaginationStyleTab }
61 />
62 ) }
63 </PanelBody>
64 ) } */}
65 {/* <PanelBody
66 title={ __( 'General', 'post-carousel' ) }
67 opened={ openPanel === 'general' }
68 onToggle={ () => togglePanelBody( 'general' ) }
69 >
70 { openPanel === 'general' && (
71 <PostSliderTwoGeneralTab
72 attributes={ attributes }
73 setAttributes={ setAttributes }
74 />
75 ) }
76 </PanelBody> */}
77 <SharedInspectors
78 attributes={attributes}
79 setAttributes={setAttributes}
80 togglePanelBody={togglePanelBody}
81 openedAccordion={openPanel}
82 />
83 </>
84 );
85 };
86
87 export default Inspector;
88