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.

Merge branch 'main' into feat-combobox-2

Oleg Isonen163aa43326e6
diff --cc apps/designer/app/designer/features/props-panel/props-panel.tsx
index bba56dcdb7,41becbd218..69c73c6e09
--- a/apps/designer/app/designer/features/props-panel/props-panel.tsx
+++ b/apps/designer/app/designer/features/props-panel/props-panel.tsx
@@@ -51,27 -40,17 +51,28 @@@ const Property = (
gap="1"
css={{ gridTemplateColumns: "1fr 1fr auto", alignItems: "center" }}
>
- <TextField
- readOnly={required}
- variant="ghost"
- placeholder="Property"
+ <Combobox
name="prop"
- value={prop}
+ autoFocus={prop === ""}
- onChange={(event) => {
- onChange(id, "prop", event.target.value);
+ options={allProps}
+ value={{
+ value: prop,
+ label: prop,
+ }}
+ onOptionSelect={({ value }) => {
+ console.log(value);
+ onChange(id, "prop", value);
}}
+ disclosure={(props) => (
+ <TextField
+ {...props}
+ readOnly={required}
+ variant="ghost"
+ placeholder="Property"
+ />
+ )}
/>
+
{isInvalidProp ? (
<Tooltip content={`Invalid property name: ${prop}`}>
<ExclamationTriangleIcon width={12} height={12} />
diff --cc yarn.lock
index d84da9d3c8,62cd43092e..39c5f7c8f4
--- a/yarn.lock
+++ b/yarn.lock
@@@ -15577,7 -16461,7 +16497,7 @@@ tslib@^1.0.0, tslib@^1.11.1, tslib@^1.1
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
- tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0:
-tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1:
++tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==