summaryrefslogtreecommitdiffhomepage
path: root/desktop
diff options
context:
space:
mode:
authorOliver <oliver@mohlin.dev>2025-04-01 12:44:20 +0200
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-05-28 13:25:25 +0200
commitde3ec5fe75f4e215a63c09a426af4ed4c099078d (patch)
treee80350d895f7269c7f10b665c840260862d67820 /desktop
parentffd1b1b19b75a14b95587370662178af56c69425 (diff)
downloadmullvadvpn-de3ec5fe75f4e215a63c09a426af4ed4c099078d.tar.xz
mullvadvpn-de3ec5fe75f4e215a63c09a426af4ed4c099078d.zip
Update ListItem hover and pressed state colors
Diffstat (limited to 'desktop')
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/lib/components/list-item/components/list-item-trigger/ListItemTrigger.tsx34
1 files changed, 22 insertions, 12 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/lib/components/list-item/components/list-item-trigger/ListItemTrigger.tsx b/desktop/packages/mullvad-vpn/src/renderer/lib/components/list-item/components/list-item-trigger/ListItemTrigger.tsx
index 4e8a72fd3d..2b80ac2a9e 100644
--- a/desktop/packages/mullvad-vpn/src/renderer/lib/components/list-item/components/list-item-trigger/ListItemTrigger.tsx
+++ b/desktop/packages/mullvad-vpn/src/renderer/lib/components/list-item/components/list-item-trigger/ListItemTrigger.tsx
@@ -8,22 +8,32 @@ import { StyledFlex } from '../list-item-content';
const StyledButton = styled(ButtonBase)<{ $disabled?: boolean }>`
display: flex;
width: 100%;
- ${({ $disabled }) =>
- !$disabled &&
- css`
- &:hover ${StyledFlex} {
- background-color: ${colors.whiteOnBlue5};
+ ${({ $disabled }) => {
+ return css`
+ --background: transparent;
+ background-color: var(--background);
+ ${!$disabled &&
+ css`
+ --background: ${colors.blue};
+ &:hover {
+ --background: ${colors.whiteOnBlue10};
+ background-color: var(--background);
+ }
+ &:active {
+ --background: ${colors.whiteOnBlue20};
+ background-color: var(--background);
+ }
+ `}
+ &&:focus-visible {
+ outline: 2px solid ${colors.white};
+ outline-offset: -2px;
+ z-index: 10;
}
&:active ${StyledFlex} {
background-color: ${colors.whiteOnBlue10};
}
- `}
-
- &&:focus-visible {
- outline: 2px solid ${colors.white};
- outline-offset: -1px;
- z-index: 10;
- }
+ `;
+ }}
`;
export type ListItemTriggerProps = React.HtmlHTMLAttributes<HTMLButtonElement>;