| 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 |
|