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.

Fix toggle button styles (#1277)

Ivan Starkov40467931796d
diff --git a/packages/design-system/src/components/icon-button.tsx b/packages/design-system/src/components/icon-button.tsx
index 2561cb2cd7..2c990aac07 100644
--- a/packages/design-system/src/components/icon-button.tsx
+++ b/packages/design-system/src/components/icon-button.tsx
@@ -32,6 +32,7 @@ export const IconButton = styled("button", {
"&:disabled": {
borderColor: "transparent",
pointerEvents: "none",
+ backgroundColor: "transparent",
},
// https://www.radix-ui.com/docs/primitives/components/popover#trigger
@@ -53,19 +54,21 @@ export const IconButton = styled("button", {
"&:hover": {
backgroundColor: theme.colors.backgroundHover,
},
- "&:disabled": {
- color: theme.colors.foregroundDisabled,
- },
// According to the design https://www.figma.com/file/sfCE7iLS0k25qCxiifQNLE/%F0%9F%93%9A-Webstudio-Library?node-id=4-3199&t=lpT9jFuaiUnz1Foa-0
// only the default variant has different toggle state
// https://www.radix-ui.com/docs/primitives/components/toggle#root
"&[data-state=on]": {
backgroundColor: theme.colors.backgroundPresetMain,
+ borderColor: theme.colors.borderMain,
"&:hover": {
backgroundColor: theme.colors.backgroundHover,
},
},
+
+ "&:disabled": {
+ color: theme.colors.foregroundDisabled,
+ },
},
preset: {