diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-12-20 16:02:44 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-01-29 09:44:53 +0100 |
| commit | 9d559db04d709e45aff875e853c5ad8b63b37740 (patch) | |
| tree | b17076332f0219c433db999b8a156e8ff1011de2 /gui/src/renderer | |
| parent | f954dc7179a32a48db1b49d3244b52132b0e8342 (diff) | |
| download | mullvadvpn-9d559db04d709e45aff875e853c5ad8b63b37740.tar.xz mullvadvpn-9d559db04d709e45aff875e853c5ad8b63b37740.zip | |
Decrease size of switch
Diffstat (limited to 'gui/src/renderer')
| -rw-r--r-- | gui/src/renderer/components/Switch.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/src/renderer/components/Switch.tsx b/gui/src/renderer/components/Switch.tsx index e5aaec4bb0..595bc422a2 100644 --- a/gui/src/renderer/components/Switch.tsx +++ b/gui/src/renderer/components/Switch.tsx @@ -16,13 +16,13 @@ interface IProps { const SwitchContainer = styled.div<{ disabled: boolean }>((props) => ({ position: 'relative', - width: '48px', - height: '30px', + width: '34px', + height: '22px', borderColor: props.disabled ? colors.white20 : colors.white80, borderWidth: '2px', borderStyle: 'solid', - borderRadius: '16px', - padding: '2px', + borderRadius: '11px', + padding: '1px', })); const Knob = styled.div<{ $isOn: boolean; disabled: boolean }>((props) => { @@ -33,14 +33,14 @@ const Knob = styled.div<{ $isOn: boolean; disabled: boolean }>((props) => { return { position: 'absolute', - height: '22px', - borderRadius: '11px', + height: '16px', + borderRadius: '8px', transition: 'all 200ms linear', - width: '22px', + width: '16px', backgroundColor, - // When enabled the button should be placed all the way to the right (100%) minus padding (2px) - // minus it's own width (22px). - left: props.$isOn ? 'calc(100% - 2px - 22px)' : '2px', + // When enabled the button should be placed all the way to the right (100%) minus padding (1px) + // minus it's own width (16px). + left: props.$isOn ? 'calc(100% - 1px - 16px)' : '1px', }; }); |
