Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 161eeab

Browse files
committed
added max height for grid items
1 parent f85cf1a commit 161eeab

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/pages/blog/_markets-news.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ const MarketsNewsWrapper = styled.div`
1111
grid-template-columns: auto auto auto;
1212
grid-gap: 30px;
1313
padding: 10px;
14+
max-height: 211px;
1415
1516
@media ${device.tabletL} {
1617
grid-template-columns: auto auto;
18+
max-height: 330px;
1719
}
1820
1921
@media ${device.tabletS} {
2022
grid-template-columns: auto;
2123
margin:0 auto;
24+
max-height: 668px;
2225
}
2326
`
2427

@@ -28,6 +31,10 @@ const StyledSpan = styled.span`
2831
border-radius: 8px;
2932
`
3033

34+
const StyledFlex = styled(Flex)`
35+
max-height: 83px;
36+
`
37+
3138
const MarketNews = () => {
3239
return (
3340
<SectionContainer>
@@ -39,7 +46,7 @@ const MarketNews = () => {
3946
<MarketsNewsWrapper>
4047
{market_news_data.filter((data) => data.report_type === "Weekly report").slice(0, 6).map((data, index) => {
4148
return (
42-
<Flex key={index}>
49+
<StyledFlex key={index}>
4350
<img src={data.img_source} width="104px" height="78px" />
4451
<Flex ml="8px" fd="column">
4552
<Header type="paragraph-2" color="blue-10">
@@ -55,7 +62,7 @@ const MarketNews = () => {
5562
</Header>
5663
</Flex>
5764
</Flex>
58-
</Flex>
65+
</StyledFlex>
5966
)
6067
})}
6168
</MarketsNewsWrapper>

0 commit comments

Comments
 (0)