diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-10-27 13:52:47 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-11-02 14:53:24 +0100 |
| commit | 412006ebe3f66fe37fbef9fbe41a28a8fe06c30e (patch) | |
| tree | 70a065b3ec507ba45f8924a49fa6c3e8c7321219 /gui/src/renderer | |
| parent | 3bd9a8dea794246a954ce84532979964a9e2ca9f (diff) | |
| download | mullvadvpn-412006ebe3f66fe37fbef9fbe41a28a8fe06c30e.tar.xz mullvadvpn-412006ebe3f66fe37fbef9fbe41a28a8fe06c30e.zip | |
Add blur to transparent buttons
Diffstat (limited to 'gui/src/renderer')
| -rw-r--r-- | gui/src/renderer/components/AppButton.tsx | 11 | ||||
| -rw-r--r-- | gui/src/renderer/components/AppButtonStyles.tsx | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gui/src/renderer/components/AppButton.tsx b/gui/src/renderer/components/AppButton.tsx index d424e8b54e..a761179924 100644 --- a/gui/src/renderer/components/AppButton.tsx +++ b/gui/src/renderer/components/AppButton.tsx @@ -3,7 +3,12 @@ import styled from 'styled-components'; import { colors } from '../../config.json'; import log from '../../shared/logging'; import { useMounted } from '../lib/utilityHooks'; -import { StyledButtonContent, StyledLabel, StyledLabelContainer } from './AppButtonStyles'; +import { + StyledButtonContent, + StyledLabel, + StyledLabelContainer, + transparentButton, +} from './AppButtonStyles'; import ImageView from './ImageView'; interface IButtonContext { @@ -178,14 +183,14 @@ export const BlueButton = styled(BaseButton)({ }, }); -export const TransparentButton = styled(BaseButton)({ +export const TransparentButton = styled(BaseButton)(transparentButton, { backgroundColor: colors.white20, ':not(:disabled):hover': { backgroundColor: colors.white40, }, }); -export const RedTransparentButton = styled(BaseButton)({ +export const RedTransparentButton = styled(BaseButton)(transparentButton, { backgroundColor: colors.red60, ':not(:disabled):hover': { backgroundColor: colors.red80, diff --git a/gui/src/renderer/components/AppButtonStyles.tsx b/gui/src/renderer/components/AppButtonStyles.tsx index f851bf69c5..5446e89b31 100644 --- a/gui/src/renderer/components/AppButtonStyles.tsx +++ b/gui/src/renderer/components/AppButtonStyles.tsx @@ -21,3 +21,7 @@ export const StyledButtonContent = styled.div({ justifyContent: 'center', padding: '9px', }); + +export const transparentButton = { + backdropFilter: 'blur(4px)', +}; |
