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 / global-settings / custom-css / customCss.js

customCss.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.8, at src/global-settings/custom-css/customCss.js

52 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 Editor from "@monaco-editor/react";
4 import { useDispatch, useSelect } from "@wordpress/data";
5
6 const CustomCss = () => {
7 const customCss = useSelect((select) => select("smartpost/global-settings").getCustomCSS());
8
9 const { setCustomCSS } = useDispatch("smartpost/global-settings");
10
11 return (
12 <PanelBody title={__("Custom CSS", "post-carousel")} initialOpen={false}>
13 <p className="sp-smart-post-component-title sp-smart-mb-5">
14 Use this area to add CSS and customize the page to your preference.
15 </p>
16
17 <Editor
18 height="200px"
19 defaultLanguage="css"
20 theme="vs-dark"
21 defaultValue=""
22 value={customCss}
23 onChange={(e) => setCustomCSS(e)}
24 options={{
25 quickSuggestions: {
26 other: "on",
27 comments: "off",
28 strings: "off",
29 },
30 quickSuggestionsDelay: 10,
31 minimap: {
32 enabled: false,
33 },
34 scrollbar: {
35 vertical: "auto",
36 horizontal: "auto",
37 verticalScrollbarSize: 5,
38 horizontalScrollbarSize: 5,
39 scrollByPage: false,
40 ignoreHorizontalScrollbarInContentHeight: false,
41 },
42 lineNumbersMinChars: 1,
43 folding: false,
44 wordWrap: "on",
45 }}
46 />
47 </PanelBody>
48 );
49 };
50
51 export default CustomCss;
52