Skip to content

Commit 7fc1387

Browse files
committed
reduce eligibility overview on mobile
1 parent d108723 commit 7fc1387

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

src/ui/screens/eligibilty-overview/components/EligibilityOverviewItem.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ const EligibilityOverviewItem = ({ t, item, eligible, isDesktop }) => {
2626
return (
2727
<VBox
2828
sx={{
29-
display: 'flex',
30-
flexDirection: 'column',
3129
gap: 3,
3230
border: `1px solid ${theme.palette.white.dark}`,
3331
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.25)',
3432
padding: 4,
35-
borderRadius: theme.shape.borderRadius,
33+
borderRadius: theme.shape.borderRadius
3634
}}
3735
>
3836
<HBox
@@ -99,20 +97,20 @@ const EligibilityOverviewItem = ({ t, item, eligible, isDesktop }) => {
9997
)}
10098
<HBox sx={{
10199
flexWrap: 'wrap',
102-
gap: 2,
100+
gap: { xs: 0, md: 2 },
103101
alignItems: 'center',
104102
justifyContent: 'space-between',
105103
'& > :only-child': { marginLeft: 'auto' }
106104
}}>
107-
<HBox sx={{ gap: 2, alignItems: 'center', flex: 3 }}>
105+
<HBox sx={{ gap: 2, alignItems: 'center', flex: { xs: 0, md: 3 } }}>
108106
{
109107
eligible !== 'indeterminate' && (
110108
<HBox>
111109
<EligibilityOverviewBanner t={t} eligible={eligible} />
112110
</HBox>
113111
)
114112
}
115-
{!isVisible && (
113+
{!isVisible && isDesktop && (
116114
<HBox sx={{ flexWrap: 'wrap', gap: 1 }}>
117115
{item.benefitCategories?.map(tag => (
118116
<EligibilityOverviewTag
@@ -125,7 +123,14 @@ const EligibilityOverviewItem = ({ t, item, eligible, isDesktop }) => {
125123
</HBox>
126124
)}
127125
</HBox>
128-
<HBox sx={{ justifyContent: { xs: 'flex-start', md: 'flex-end' }, flexWrap: 'wrap', gap: 2, alignItems: 'center', flex: 3 }}>
126+
<HBox sx={{
127+
justifyContent: { xs: 'flex-start', md: 'flex-end' },
128+
flexWrap: 'wrap',
129+
gap: 2,
130+
alignItems: 'center',
131+
flex: 3
132+
}}
133+
>
129134
<RegularButton
130135
variant={'blackOutlined'}
131136
text={'app.browseAll.learnMoreBtn'}

src/ui/screens/eligibilty-overview/components/EligibilityOverviewTag.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import { HBox } from '@/ui/shared-components/LayoutBoxes';
55
import theme from '@/theme';
66

77
const EligibilityOverTag = ({ tag, isDesktop }) => {
8-
const textSize = isDesktop ? 'body1' : 'body2';
98

109
return (
1110
<HBox sx={{
1211
backgroundColor: 'greyTransparent.main',
1312
padding: '6px 18px',
1413
borderRadius: theme.shape.borderRadius,
1514
}}>
16-
<Typography variant={textSize}>
15+
<Typography variant={isDesktop ? 'body1' : 'body2'}>
1716
{tag}
1817
</Typography>
1918
</HBox>

0 commit comments

Comments
 (0)