Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(suite): align promo buttons to the right #15591

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading