Skip to content

Commit

Permalink
Fix conditional header components
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Nov 29, 2024
1 parent 8821285 commit f387125
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,19 @@ function CategoryHeader({ title, description, icon, ...props }) {
)}
{title}
</Typography>
<Typography
variant="body2"
sx={({ typography }) => ({
paddingBottom: typography.pxToRem(20),
"& p": {
margin: 0,
},
})}
>
{description}
</Typography>
{description && (
<Typography
variant="body2"
sx={({ typography }) => ({
paddingBottom: typography.pxToRem(20),
"& p": {
margin: 0,
},
})}
>
{description}
</Typography>
)}
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@ function SubcategoryHeader({ title, description, ...props }) {
>
{title}
</Typography>
<Typography
variant="body2"
sx={({ typography }) => ({
paddingBottom: typography.pxToRem(20),
"& p": {
margin: 0,
},
})}
>
{description}
</Typography>
{description && (
<Typography
variant="body2"
sx={({ typography }) => ({
paddingBottom: typography.pxToRem(20),
"& p": {
margin: 0,
},
})}
>
{description}
</Typography>
)}
</Box>
);
}
Expand Down

0 comments on commit f387125

Please sign in to comment.