summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOliver <oliver@mohlin.dev>2025-04-28 08:58:16 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2025-04-30 11:04:49 +0200
commit01f07f2c5ca1ed10a340629feb903f62243c49ef (patch)
tree92a4e8d2d0653bb3cf84819fcdb314ddd6f8aa7c
parent48bc0ca1cd7a98a5a4514dc886009a7ec8682339 (diff)
downloadmullvadvpn-01f07f2c5ca1ed10a340629feb903f62243c49ef.tar.xz
mullvadvpn-01f07f2c5ca1ed10a340629feb903f62243c49ef.zip
Use ButtonGroup in Modal
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/Modal.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/Modal.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/Modal.tsx
index a3c78ac00d..41808d487d 100644
--- a/desktop/packages/mullvad-vpn/src/renderer/components/Modal.tsx
+++ b/desktop/packages/mullvad-vpn/src/renderer/components/Modal.tsx
@@ -8,10 +8,10 @@ import { FlexColumn } from '../lib/components/flex-column';
import { Colors } from '../lib/foundations';
import { IconBadge } from '../lib/icon-badge';
import { useEffectEvent } from '../lib/utility-hooks';
+import { ButtonGroup } from './ButtonGroup';
import { measurements, normalText, tinyText } from './common-styles';
import CustomScrollbars from './CustomScrollbars';
import { BackAction } from './KeyboardNavigation';
-import { SmallButtonGrid } from './SmallButton';
const MODAL_CONTAINER_ID = 'modal-container';
@@ -153,10 +153,6 @@ const ModalAlertButtonGroupContainer = styled.div({
marginTop: measurements.buttonVerticalMargin,
});
-const StyledSmallButtonGrid = styled(SmallButtonGrid)({
- marginRight: '16px',
-});
-
const ModalAlertButtonContainer = styled.div({
display: 'flex',
flexDirection: 'column',
@@ -289,10 +285,12 @@ class ModalAlertImpl extends React.Component<IModalAlertImplProps, IModalAlertSt
<ModalAlertButtonGroupContainer>
{this.props.gridButtons && (
- <StyledSmallButtonGrid>{this.props.gridButtons}</StyledSmallButtonGrid>
+ <ButtonGroup $gap="small" $flexWrap="wrap-reverse" $margin={{ right: 'medium' }}>
+ {this.props.gridButtons}
+ </ButtonGroup>
)}
{this.props.buttons && (
- <FlexColumn $gap="medium">
+ <FlexColumn $gap="small">
{this.props.buttons.map((button, index) => (
<ModalAlertButtonContainer key={index}>{button}</ModalAlertButtonContainer>
))}