Skip to content

Commit 9b46a58

Browse files
committed
add new link components
1 parent 89f34a5 commit 9b46a58

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import React from 'react';
2+
import { VBox } from '@/ui/shared-components/LayoutBoxes';
3+
import { Typography } from '@mui/material';
4+
import RegularButton from '@/ui/shared-components/buttons/RegularButton';
5+
import theme from '@/theme';
6+
7+
const BenefitPageLinkButton = ({ link }) => {
8+
console.log('Rendering BenefitPageLinkButton with link:', link);
9+
10+
return (
11+
<VBox
12+
sx={{
13+
width: { xs: '100%', sm: 250 },
14+
padding: { xs: 2, sm: 4 },
15+
backgroundColor: "transparent",
16+
border: "1px solid",
17+
borderColor: "blue.main",
18+
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.25)',
19+
borderRadius: theme.shape.borderRadius
20+
21+
}}
22+
>
23+
<VBox sx={{ gap: 2 }} >
24+
<Typography variant="h4" sx={{ fontWeight: 500, wordBreak: "break-word" }}>
25+
{link?.title}
26+
</Typography>
27+
<Typography variant="body1" sx={{ wordBreak: "break-word" }}>
28+
{link?.description}
29+
</Typography>
30+
<RegularButton
31+
variant="transparentBlueOutlined"
32+
size='small'
33+
text={'Link öffnen'}
34+
link={link?.url}
35+
/>
36+
</VBox >
37+
</VBox >
38+
);
39+
}
40+
41+
export default BenefitPageLinkButton;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import { VBox, HBox } from '@/ui/shared-components/LayoutBoxes';
3+
import theme from '@/theme';
4+
import { Typography } from '@mui/material';
5+
import BenefitPageLinkButton from './BenefitPageLinkButton';
6+
7+
const BenefitPageLinks = ({ t, linksList }) => {
8+
9+
return (
10+
<VBox
11+
sx={{
12+
backgroundColor: 'white.main',
13+
padding: { xs: '32px 20px', md: '32px' },
14+
borderRadius: theme.shape.borderRadius,
15+
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.25)',
16+
gap: 4,
17+
}}
18+
>
19+
<VBox sx={{ gap: 4 }} >
20+
<HBox gap={1} sx={{ maxWidth: 800, justifyContent: 'space-between', alignItems: 'flex-start' }}>
21+
<Typography variant="h2" sx={{ fontWeight: 500, wordBreak: "break-word" }}>
22+
{t('app.benefitPage.links.title')}
23+
</Typography>
24+
</HBox>
25+
<HBox sx={{flexWrap: 'wrap', gap: 2, alignItems: 'center'}}>
26+
{
27+
linksList?.map((link, i) =>
28+
<BenefitPageLinkButton key={i} t={t} link={link} />
29+
)
30+
}
31+
</HBox>
32+
</VBox >
33+
</VBox >
34+
);
35+
}
36+
37+
export default BenefitPageLinks;

0 commit comments

Comments
 (0)