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

83 lines 2.4 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 { usePanelBodyContext } from "../../context";
5 import { ThumbnailProgressBarTab, ThumbnailSliderTwoGeneralTab, ThumbnailTwoSliderTab } from "./generalTab";
6 import SharedInspectors from "../shared/inspectors";
7
8 const Inspect = ({ attributes, setAttributes, isSelected }) => {
9 const { openPanel, togglePanelBody } = usePanelBodyContext();
10 const {
11 thumbnailSliderTwoLayout,
12 // thumbnailTwoNavArrow,
13 carouselNavArrow,
14 } = attributes;
15
16 return (
17 <>
18 <PanelBody
19 title={__("Thumbnails Slider", "post-carousel")}
20 opened={openPanel === "general"}
21 onToggle={() => togglePanelBody("general")}
22 initialOpen={true}
23 >
24 {"general" === openPanel && (
25 <TabControls
26 attributes={attributes}
27 setAttributes={setAttributes}
28 GeneralTab={ThumbnailSliderTwoGeneralTab}
29 SliderTab={ThumbnailTwoSliderTab}
30 />
31 )}
32 </PanelBody>
33 {"thumbnail-slider-two-layout-two" === thumbnailSliderTwoLayout && (
34 <PanelBody
35 title={__("Thumbnails Progress Bar", "post-carousel")}
36 opened={openPanel === "progressBar"}
37 onToggle={() => togglePanelBody("progressBar")}
38 >
39 {"progressBar" === openPanel && (
40 <ThumbnailProgressBarTab attributes={attributes} setAttributes={setAttributes} />
41 )}
42 </PanelBody>
43 )}
44 {/* { carouselNavArrow && (
45 <PanelBody
46 title={ __( 'Navigation Arrow', 'post-carousel' ) }
47 opened={ openPanel === 'navigation' }
48 onToggle={ () => togglePanelBody( 'navigation' ) }
49 >
50 { openPanel === 'navigation' && (
51 <TabControls
52 attributes={ attributes }
53 setAttributes={ setAttributes }
54 GeneralTab={ CarouselNavArrowGeneralTab }
55 StyleTab={ CarouselNavArrowStyleTab }
56 />
57 ) }
58 </PanelBody>
59 ) } */}
60 {/* <PanelBody
61 title={ __( 'General', 'post-carousel' ) }
62 opened={ openPanel === 'general' }
63 onToggle={ () => togglePanelBody( 'general' ) }
64 >
65 { openPanel === 'general' && (
66 <ThumbnailTwoGeneralTab
67 attributes={ attributes }
68 setAttributes={ setAttributes }
69 />
70 ) }
71 </PanelBody> */}
72 <SharedInspectors
73 attributes={attributes}
74 setAttributes={setAttributes}
75 togglePanelBody={togglePanelBody}
76 openedAccordion={openPanel}
77 />
78 </>
79 );
80 };
81
82 export default Inspect;
83