Skip to content

Commit

Permalink
fix(suite): align promo buttons to the right
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavProchazka committed Nov 29, 2024
1 parent bb855cb commit edc4e78
Showing 1 changed file with 24 additions and 35 deletions.
59 changes: 24 additions & 35 deletions packages/suite/src/views/dashboard/PromoBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import styled, { css } from 'styled-components';

import { SUITE_MOBILE_APP_STORE, SUITE_MOBILE_PLAY_STORE, SUITE_URL } from '@trezor/urls';
import { EventType, analytics } from '@trezor/suite-analytics';
import { Button, Icon, Image, Tooltip, variables } from '@trezor/components';
import { Button, Icon, Image, Tooltip, variables, Row } from '@trezor/components';
import { isWeb } from '@trezor/env-utils';
import { spacingsPx } from '@trezor/theme';
import { spacings } from '@trezor/theme';

import { Translation, QrCode, TrezorLink } from 'src/components/suite';
import { useLayoutSize } from 'src/hooks/suite/useLayoutSize';
Expand Down Expand Up @@ -53,14 +53,10 @@ const DesktopPromoContainer = styled.div`
const MobilePromoContainer = styled.div`
${promoContainerCss}
justify-content: start;
margin: ${spacingsPx.sm} ${spacingsPx.xxxl} auto auto;
padding-bottom: ${spacingsPx.sm};
${variables.SCREEN_QUERY.MOBILE} {
flex-direction: column;
gap: 0;
padding: 20px 16px;
justify-content: space-between;
}
`;

Expand Down Expand Up @@ -92,15 +88,6 @@ const DesktopLinkButton = styled(Button)`
}
`;

const BadgeContainer = styled.div`
display: flex;
gap: 10px;
${variables.SCREEN_QUERY.MOBILE} {
margin: 0;
}
`;

// eslint-disable-next-line local-rules/no-override-ds-component
const StyledTooltip = styled(Tooltip)`
display: flex;
Expand Down Expand Up @@ -241,27 +228,29 @@ export const PromoBanner = () => {
)}

<MobilePromoContainer>
<Translation
values={{ b: text => <b>{text}</b> }}
id="TR_MOBILE_APP_PROMO_TEXT_FOOTER"
/>

<BadgeContainer>
<StoreBadge
url={SUITE_MOBILE_APP_STORE}
image="APP_STORE"
type="app-store"
analyticsPayload="ios"
shownQRState={shownQRState}
<Row justifyContent="space-between" width="100%">
<Translation
values={{ b: text => <b>{text}</b> }}
id="TR_MOBILE_APP_PROMO_TEXT_FOOTER"
/>
<StoreBadge
url={SUITE_MOBILE_PLAY_STORE}
image="PLAY_STORE"
type="play-store"
analyticsPayload="android"
shownQRState={shownQRState}
/>
</BadgeContainer>

<Row gap={spacings.xxs}>
<StoreBadge
url={SUITE_MOBILE_APP_STORE}
image="APP_STORE"
type="app-store"
analyticsPayload="ios"
shownQRState={shownQRState}
/>
<StoreBadge
url={SUITE_MOBILE_PLAY_STORE}
image="PLAY_STORE"
type="play-store"
analyticsPayload="android"
shownQRState={shownQRState}
/>
</Row>
</Row>
</MobilePromoContainer>
</Container>
);
Expand Down

0 comments on commit edc4e78

Please sign in to comment.