Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: interactive styles on secondary button inside a ButtonGroup #1938

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shiny-otters-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Fixed the interactive styles of the secondary button inside a `ButtonGroup`.
4 changes: 4 additions & 0 deletions packages/circuit-ui/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,16 @@ export const tertiaryStyles = ({

&:hover {
color: ${theme.colors[colors.hover]};
background-color: transparent;
border-color: transparent;
}

&:active,
&[aria-expanded='true'],
&[aria-pressed='true'] {
color: ${theme.colors[colors.active]};
background-color: transparent;
border-color: transparent;
}
`;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1305,12 +1305,16 @@ exports[`Button styles should render a tertiary button 1`] = `

.circuit-0:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-0:active,
.circuit-0[aria-expanded='true'],
.circuit-0[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

.circuit-1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,16 @@ exports[`ButtonGroup should render aligned to the center 1`] = `

.circuit-5:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-5:active,
.circuit-5[aria-expanded='true'],
.circuit-5[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down Expand Up @@ -555,12 +559,16 @@ exports[`ButtonGroup should render aligned to the left 1`] = `

.circuit-5:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-5:active,
.circuit-5[aria-expanded='true'],
.circuit-5[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down Expand Up @@ -856,12 +864,16 @@ exports[`ButtonGroup should render aligned to the right 1`] = `

.circuit-5:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-5:active,
.circuit-5[aria-expanded='true'],
.circuit-5[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down Expand Up @@ -1157,12 +1169,16 @@ exports[`ButtonGroup should render with default styles 1`] = `

.circuit-5:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-5:active,
.circuit-5[aria-expanded='true'],
.circuit-5[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,16 @@ exports[`NotificationInline styles should render notification toast with an acti

.circuit-6:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-6:active,
.circuit-6[aria-expanded='true'],
.circuit-6[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

.circuit-6:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,16 @@ exports[`NotificationModal styles should render with an SVG 1`] = `

.circuit-16:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-16:active,
.circuit-16[aria-expanded='true'],
.circuit-16[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down Expand Up @@ -956,12 +960,16 @@ exports[`NotificationModal styles should render with default styles 1`] = `

.circuit-15:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-15:active,
.circuit-15[aria-expanded='true'],
.circuit-15[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down Expand Up @@ -1482,12 +1490,16 @@ exports[`NotificationModal styles should render without an image 1`] = `

.circuit-14:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-14:active,
.circuit-14[aria-expanded='true'],
.circuit-14[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ exports[`Pagination with 2 to 5 pages should render with default styles 1`] = `

.circuit-1:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-1:active,
.circuit-1[aria-expanded='true'],
.circuit-1[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

.circuit-2 {
Expand Down Expand Up @@ -293,12 +297,16 @@ li:last-child .circuit-7 {

.circuit-11:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-11:active,
.circuit-11[aria-expanded='true'],
.circuit-11[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

li:last-child .circuit-11 {
Expand Down Expand Up @@ -366,12 +374,16 @@ li:last-child .circuit-11 {

.circuit-27:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-27:active,
.circuit-27[aria-expanded='true'],
.circuit-27[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

<nav
Expand Down Expand Up @@ -656,12 +668,16 @@ exports[`Pagination with more than 5 pages should render with default styles 1`]

.circuit-1:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-1:active,
.circuit-1[aria-expanded='true'],
.circuit-1[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

.circuit-2 {
Expand Down Expand Up @@ -888,12 +904,16 @@ select:not(:active)~.circuit-13 {

.circuit-15:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-15:active,
.circuit-15[aria-expanded='true'],
.circuit-15[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

<nav
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,16 @@ li:last-child .circuit-1 {

.circuit-5:hover {
color: #234BC3;
background-color: transparent;
border-color: transparent;
}

.circuit-5:active,
.circuit-5[aria-expanded='true'],
.circuit-5[aria-pressed='true'] {
color: #1A368E;
background-color: transparent;
border-color: transparent;
}

li:last-child .circuit-5 {
Expand Down