Skip to content

Commit 3212903

Browse files
authored
Merge pull request #1033 from vr-varad/fix/responsive_issue
Fix: Responsive Issue on Smaller Devices - Catalog Content
2 parents ce2bdb3 + cd51005 commit 3212903

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/custom/CatalogDetail/OverviewSection.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import MetricsDisplay from './MetricsDisplay';
77
import PatternInfo from './PatternInfo';
88
import SocialSharePopper from './SocialSharePopper';
99
import UserInfo from './UserInfo';
10-
import { ContentRow, DesignHeading, OverviewContainer } from './style';
10+
import { ContentRow, DesignHeading, OverviewContainer, OverviewContainerHeader } from './style';
1111
import { Class } from './types';
1212

1313
interface OverviewSectionProps {
@@ -50,15 +50,7 @@ const OverviewSection: React.FC<OverviewSectionProps> = ({
5050
}) => {
5151
return (
5252
<OverviewContainer>
53-
<div
54-
style={{
55-
display: 'flex',
56-
flexDirection: 'row',
57-
width: '100%',
58-
flexWrap: 'wrap',
59-
fontFamily: fontFamily || 'inherit'
60-
}}
61-
>
53+
<OverviewContainerHeader>
6254
<DesignHeading>{details?.name}</DesignHeading>
6355
<SocialSharePopper
6456
details={details}
@@ -70,7 +62,7 @@ const OverviewSection: React.FC<OverviewSectionProps> = ({
7062
showShareAction={showShareAction}
7163
handleShare={handleShare}
7264
/>
73-
</div>
65+
</OverviewContainerHeader>
7466
<Grid container spacing={2}>
7567
<Grid item lg={4} md={4} sm={12} xs={12}>
7668
<Grid container>

src/custom/CatalogDetail/style.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,18 @@ export const OverviewContainer = styled('div')(({ theme }) => ({
200200
borderRadius: '0.4rem'
201201
}));
202202

203+
export const OverviewContainerHeader = styled('div')(({ theme }) => ({
204+
display: 'flex',
205+
flexDirection: 'row',
206+
width: '100%',
207+
flexWrap: 'wrap',
208+
fontFamily: 'inherit',
209+
210+
[theme.breakpoints.down('sm')]: {
211+
flexDirection: 'column'
212+
}
213+
}));
214+
203215
export const DesignHeading = styled('h1')(({ theme }) => ({
204216
textAlign: 'left',
205217
margin: '0rem 0rem 2rem 0rem',

0 commit comments

Comments
 (0)