import { __, _x } from "@wordpress/i18n"; import { PanelBody, __experimentalInputControl as InputControl, Button } from "@wordpress/components"; import { MobileIcon, TabletIcon } from "../../components/responsive/icon"; import "./editor.scss"; import { useDispatch, useSelect } from "@wordpress/data"; import { Divider } from "../../components"; import { ResetIcon } from "../../icons/icons"; const Breakpoint = () => { const breakpoint = useSelect((select) => select("smartpost/global-settings").getCategory("breakpoint")); const { updateSetting } = useDispatch("smartpost/global-settings"); const breakpointChange = (newValue, key) => { updateSetting("breakpoint", key, newValue); }; const resetBreakpoint = (key) => { const resetValue = { container: 1200, tablet: 1023, mobile: 767, } updateSetting("breakpoint", key, resetValue[key]); }; return (
Tablet Max Width
breakpointChange(newValue, "tablet")} /> Px
Mobile Max Width
breakpointChange(newValue, "mobile")} /> Px
); }; export default Breakpoint;