PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / gutenberg / util / helpers / handlingPreviewBtnsHelpers.js

handlingPreviewBtnsHelpers.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/gutenberg/util/helpers/handlingPreviewBtnsHelpers.js

32 lines 714 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 //
2 // These following 3 functions to handle the resBtns click
3 // function 1: to handle desktop button click
4 export const handleDesktopBtnClick = ({
5 setPreviewDeviceType,
6 setAttributes,
7 }) => {
8 setAttributes({
9 resOption: "Desktop",
10 });
11 setPreviewDeviceType("Desktop");
12 };
13
14 // function 2: to handle Tab button click
15 export const handleTabBtnClick = ({ setPreviewDeviceType, setAttributes }) => {
16 setAttributes({
17 resOption: "Tablet",
18 });
19 setPreviewDeviceType("Tablet");
20 };
21
22 // function 3: to handle Mobile button click
23 export const handleMobileBtnClick = ({
24 setPreviewDeviceType,
25 setAttributes,
26 }) => {
27 setAttributes({
28 resOption: "Mobile",
29 });
30 setPreviewDeviceType("Mobile");
31 };
32