summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2024-08-16 13:41:24 +0200
committerOskar <oskar@mullvad.net>2024-08-21 17:05:50 +0200
commitb90b3d13fc1518f45d9d8599000ec45fc8574050 (patch)
tree3a86a8d4b31c50376ba5b68bd3daadd55be7efa0 /gui/src
parent6af3e1650bedca66955e10da09cb2f0def314ab3 (diff)
downloadmullvadvpn-b90b3d13fc1518f45d9d8599000ec45fc8574050.tar.xz
mullvadvpn-b90b3d13fc1518f45d9d8599000ec45fc8574050.zip
Make MultiButton less specific to AppButton
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/renderer/components/MultiButton.tsx18
1 files changed, 10 insertions, 8 deletions
diff --git a/gui/src/renderer/components/MultiButton.tsx b/gui/src/renderer/components/MultiButton.tsx
index e1fa3d379e..3129abcbb2 100644
--- a/gui/src/renderer/components/MultiButton.tsx
+++ b/gui/src/renderer/components/MultiButton.tsx
@@ -1,9 +1,7 @@
import React from 'react';
import styled from 'styled-components';
-import * as AppButton from './AppButton';
-
-const SIDE_BUTTON_WIDTH = 50;
+const SIDE_BUTTON_WIDTH = 44;
const ButtonRow = styled.div({
display: 'flex',
@@ -22,19 +20,23 @@ const SideButton = styled.button({
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
width: SIDE_BUTTON_WIDTH,
- alignItems: 'center',
- marginLeft: 1,
+ marginLeft: '1px !important',
});
+export interface MultiButtonCompatibleProps {
+ className?: string;
+ textOffset?: number;
+}
+
interface IMultiButtonProps {
- mainButton: React.ComponentType<AppButton.IProps>;
- sideButton: React.ComponentType<AppButton.IProps>;
+ mainButton: React.ComponentType<MultiButtonCompatibleProps>;
+ sideButton: React.ComponentType<MultiButtonCompatibleProps>;
}
export function MultiButton(props: IMultiButtonProps) {
return (
<ButtonRow>
- <MainButton as={props.mainButton} textOffset={SIDE_BUTTON_WIDTH} />
+ <MainButton as={props.mainButton} textOffset={SIDE_BUTTON_WIDTH + 1} />
<SideButton as={props.sideButton} />
</ButtonRow>
);