Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

remove default breakpoint, start mobile one from 0

Oleg Isonen07215e03f19c
diff --git a/app/designer/features/breakpoints/trigger-button.tsx b/app/designer/features/breakpoints/trigger-button.tsx
index a124b78e30..5c95162d8c 100644
--- a/app/designer/features/breakpoints/trigger-button.tsx
+++ b/app/designer/features/breakpoints/trigger-button.tsx
@@ -12,7 +12,6 @@ import {
LaptopIcon,
MobileIcon,
TabletIcon,
- DevicesIcon,
} from "~/shared/icons";
type TriggerButtonProps = ComponentProps<typeof Button>;
@@ -28,10 +27,7 @@ const renderIcon = (breakpoint: Breakpoint, variant: "contrast" | "gray") => {
if (breakpoint.minWidth >= 768) {
return <TabletIcon color={color} />;
}
- if (breakpoint.minWidth >= 360) {
- return <MobileIcon color={color} />;
- }
- return <DevicesIcon color={color} />;
+ return <MobileIcon color={color} />;
};
export const TriggerButton = forwardRef<
@@ -43,6 +39,7 @@ export const TriggerButton = forwardRef<
const [canvasWidth = 0] = useCanvasWidth();
if (breakpoint === undefined) return null;
const variant = willRender(breakpoint, canvasWidth) ? "contrast" : "gray";
+
return (
<Button
{...props}
diff --git a/mongo-migrations/style.js b/mongo-migrations/style.js
index 137759a6d6..82b9a66776 100644
--- a/mongo-migrations/style.js
+++ b/mongo-migrations/style.js
@@ -7,6 +7,8 @@ const transform = (instance) => {
if (instance.style) {
instance.cssRules = [
{
+ // @todo this needs a real breakpoint
+ // also need to insert breakpoitns
breakpoint: "default",
style: instance.style,
},
diff --git a/package.json b/package.json
index 927f281e1a..0012761165 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"@remix-run/serve": "^1.2.3",
"@remix-run/vercel": "^1.2.3",
"@stitches/react": "^1.2.7",
- "@webstudio-is/sdk": "^0.2.0-pre.0",
+ "@webstudio-is/sdk": "^0.2.0-pre.1",
"bson-objectid": "^2.0.2",
"camelcase": "^6.3.0",
"hyphenate-style-name": "^1.0.4",
diff --git a/yarn.lock b/yarn.lock
index 413f95ecfa..2298f6d14d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1814,10 +1814,10 @@
dependencies:
web-streams-polyfill "^3.1.1"
-"@webstudio-is/sdk@^0.2.0":
- version "0.2.0-pre.0"
- resolved "https://registry.yarnpkg.com/@webstudio-is/sdk/-/sdk-0.2.0-pre.0.tgz#806dc1509964107de333ce8ece352226610300b9"
- integrity sha512-G0c7NtEsW9jTKX2CJRX8T53b+k0lp/s1mjoatSdYyFhvOisbPIFSrx7DxuCCf7HOEadcCjKixwdmMi9SixbdiQ==
+"@webstudio-is/sdk@^0.2.0-pre.1":
+ version "0.2.0-pre.1"
+ resolved "https://registry.yarnpkg.com/@webstudio-is/sdk/-/sdk-0.2.0-pre.1.tgz#f7bfe49e6d818cb811432111e6812f16a44a8f99"
+ integrity sha512-Fk7QliYSuJ0m3skl/dhBJUZYwU1VcUTEcmPKGr2HrD0dU7WDoyG+pqghSxf+0T27llIH5x4y2Xr37hRkNTaMyQ==
dependencies:
"@prisma/client" "^3.10.0"
"@stitches/core" "^1.2.7"