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.

adjust for using the new select

Oleg Isonenc9f40f0a0e8e
diff --git a/app/designer/features/props-panel/control.tsx b/app/designer/features/props-panel/control.tsx
index 339c63b1fc..62c275bd79 100644
--- a/app/designer/features/props-panel/control.tsx
+++ b/app/designer/features/props-panel/control.tsx
@@ -86,9 +86,11 @@ const RadioControl = ({
))}
</RadioGroup>
);
+
type SelectControlProps = BaseControlProps & {
options: Array<string>;
};
+
const SelectControl = ({
value,
options,
@@ -98,16 +100,9 @@ const SelectControl = ({
<Select
name="value"
value={String(value || defaultValue || "")}
- onChange={(event) => {
- onChange(event.target.value);
- }}
- >
- {options.map((optionValue) => (
- <option value={optionValue} key={optionValue}>
- {optionValue}
- </option>
- ))}
- </Select>
+ options={options}
+ onChange={onChange}
+ />
);
const BooleanControl = ({
diff --git a/app/shared/design-system/stitches.config.ts b/app/shared/design-system/stitches.config.ts
index d35b2a1f50..9b9daafa4d 100644
--- a/app/shared/design-system/stitches.config.ts
+++ b/app/shared/design-system/stitches.config.ts
@@ -193,8 +193,6 @@ export const {
...blackA,
// Semantic colors
- background: "white",
- text: "black",
hiContrast: "$slate12",
loContrast: "$slate1",
muted: "$slate6",
@@ -496,8 +494,6 @@ export const darkTheme = createTheme("dark-theme", {
...goldDarkA,
// Semantic colors
- background: "$slate1",
- text: "$slate12",
muted: "$slate8",
primary: "$blue9",
hiContrast: "$slate12",