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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Fixed label's cursor & couple TS fixes (#1549)
Roman Pominov5399b206f36c
diff --git a/apps/builder/app/builder/features/props-panel/controls/combined.tsx b/apps/builder/app/builder/features/props-panel/controls/combined.tsxindex d1ef3146e3..def0865b80 100644--- a/apps/builder/app/builder/features/props-panel/controls/combined.tsx+++ b/apps/builder/app/builder/features/props-panel/controls/combined.tsx@@ -159,9 +159,17 @@ export const renderControl = ({/>);}++ if (prop.type === "string[]") {+ throw new Error(+ `Cannot render a fallback control for prop "${rest.propName}" with type string[], because we don't know the available options for a multiselect control`+ );+ }++ prop satisfies never;}throw new Error(- `Unsupported combination of prop and control: name=${rest.propName}, type=${prop?.type}, control=${meta.control}`+ `Unsupported control type "${meta.control}" for prop "${rest.propName}"`);};diff --git a/apps/builder/app/builder/features/props-panel/use-props-logic.ts b/apps/builder/app/builder/features/props-panel/use-props-logic.tsindex ceeb4a3ab0..f14faafb76 100644--- a/apps/builder/app/builder/features/props-panel/use-props-logic.ts+++ b/apps/builder/app/builder/features/props-panel/use-props-logic.ts@@ -68,12 +68,14 @@ const getDefaultMetaForType = (type: Prop["type"]): PropMeta => {return { type: "boolean", control: "boolean", required: false };case "asset":return { type: "string", control: "file", required: false };+ case "page":+ return { type: "string", control: "url", required: false };case "string[]":throw new Error("A prop with type string[] must have a meta, we can't provide a default one because we need a list of options");default:- throw new Error(`Usupported data type: ${type}`);+ throw new Error(`Usupported data type: ${type satisfies never}`);}};diff --git a/packages/design-system/src/components/label.tsx b/packages/design-system/src/components/label.tsxindex a1f67bb63b..d011dd318a 100644--- a/packages/design-system/src/components/label.tsx+++ b/packages/design-system/src/components/label.tsx@@ -17,6 +17,7 @@ const StyledLabel = styled(RadixLabel, {WebkitAppearance: "none",WebkitFontSmoothing: "antialiased",display: "block",+ cursor: "default",boxSizing: "border-box",flexShrink: 0,