Skip to content

Commit

Permalink
Fix disabled ButtonGroup action
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jan 3, 2024
1 parent 9a6287c commit 56b6da8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-pets-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Fixed the disabled styles of the secondary action inside a ButtonGroup.
1 change: 1 addition & 0 deletions packages/circuit-ui/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default {
subcomponents: { IconButton, CloseButton, ButtonGroup },
argTypes: {
children: { control: 'text' },
disabled: { control: 'boolean' },
},
};

Expand Down
26 changes: 16 additions & 10 deletions packages/circuit-ui/components/Button/base.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,6 @@
transform: translateY(2px);
}

/* Disabled */
.base:disabled,
.base[disabled],
.base[aria-disabled="true"] {
color: var(--cui-fg-normal-disabled);
cursor: not-allowed;
background-color: var(--cui-bg-highlight-disabled);
border-color: transparent;
}

/* ButtonGroup */
@container cui-button-group (width < 360px) {
.base {
Expand Down Expand Up @@ -398,3 +388,19 @@
display: none;
}
}

/* Disabled */
.base:disabled,
.base[disabled],
.base[aria-disabled="true"] {
color: var(--cui-fg-normal-disabled);
cursor: not-allowed;
background-color: var(--cui-bg-highlight-disabled);
border-color: transparent;
}

.base:disabled .content,
.base[disabled] .content,
.base[aria-disabled="true"] .content {
transform: translate(0);
}

0 comments on commit 56b6da8

Please sign in to comment.