Skip to content

Commit

Permalink
responsive banner
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Nov 9, 2024
1 parent c9c7c0e commit a3ef737
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 51 deletions.
43 changes: 1 addition & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 33 additions & 9 deletions src/components/pages/AnnouncementBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,37 @@ import { Button, Typography } from '@ensdomains/thorin'
const Container = styled(Link)(
({ theme }) => css`
display: flex;
flex-direction: row;
flex-direction: column;
width: ${theme.space.full};
max-width: 466px;
padding: ${theme.space['4']};
align-items: center;
justify-content: space-between;
gap: ${theme.space['4']};
align-self: center;
border-radius: ${theme.radii['2xLarge']};
background-color: ${theme.colors.backgroundPrimary};
@media (max-width: 640px) {
a {
width: 100%;
}
}
@media (min-width: 640px) {
flex-direction: row;
}
`,
)

const TextContainer = styled.div(
({ theme }) => css`
display: flex;
flex-direction: row;
align-items: center;
gap: ${theme.space['4']};
width: ${theme.space.full};
`,
)

Expand All @@ -30,14 +52,16 @@ export const AnnouncementBanner = () => {

return (
<Container href="/ens-v2">
<img src="/migrate/confetti.png" alt="" height={33} width={33} />
<Text>
<Typography fontVariant="largeBold">{t('banner.title')}</Typography>
<Typography fontVariant="small" color="grey">
{t('banner.caption')}
</Typography>
</Text>
<Button colorStyle="greenPrimary" width="max">
<TextContainer>
<img src="/migrate/confetti.png" alt="" height={33} width={33} />
<Text>
<Typography fontVariant="largeBold">{t('banner.title')}</Typography>
<Typography fontVariant="small" color="grey">
{t('banner.caption')}
</Typography>
</Text>
</TextContainer>
<Button as="a" href="/ens-v2" colorStyle="greenPrimary" width="max">
{t('banner.cta')}
</Button>
</Container>
Expand Down

0 comments on commit a3ef737

Please sign in to comment.