Skip to content

Commit f4b8c00

Browse files
authored
Get hover and active states for invisible button (#1518)
1 parent befc751 commit f4b8c00

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/Button/ButtonInvisible.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ const ButtonInvisible = styled(ButtonBase)<ButtonBaseProps & ButtonSystemProps &
1212
box-shadow: none;
1313
1414
&:disabled {
15-
color: ${get('colors.fg.muted')};
15+
color: ${get('colors.primer.fg.disabled')};
1616
}
17-
1817
&:focus {
1918
box-shadow: ${get('shadows.btn.focusShadow')};
2019
}
20+
&:hover {
21+
background-color: ${get('colors.btn.hoverBg')};
22+
}
23+
&:active {
24+
background-color: ${get('colors.btn.selectedBg')};
25+
}
2126
2227
${buttonSystemProps};
2328
${sx}

src/__tests__/__snapshots__/Button.test.tsx.snap

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,13 +472,21 @@ exports[`ButtonInvisible renders correct disabled styles 1`] = `
472472
}
473473
474474
.c0:disabled {
475-
color: #57606a;
475+
color: #8c959f;
476476
}
477477
478478
.c0:focus {
479479
box-shadow: 0 0 0 3px rgba(9,105,218,0.3);
480480
}
481481
482+
.c0:hover {
483+
background-color: #f3f4f6;
484+
}
485+
486+
.c0:active {
487+
background-color: hsla(220,14%,94%,1);
488+
}
489+
482490
<button
483491
className="c0"
484492
disabled={true}

0 commit comments

Comments
 (0)