Skip to content

Commit

Permalink
Shanbady/search page card mobile updates (#1156)
Browse files Browse the repository at this point in the history
* making style changes for lr card in mobile view

* fixing style prop for list card title
  • Loading branch information
shanbady authored Jun 25, 2024
1 parent 6a5d2e0 commit c1eb250
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontends/ol-components/src/components/Card/ListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const Info = styled.div`

const Title = styled.h3`
flex-grow: 1;
color: ${theme.custom.colors.darkGray2};
text-overflow: ellipsis;
${{ ...theme.typography.subtitle1 }}
height: ${theme.typography.pxToRem(40)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ const IMAGE_SIZES = {
desktop: { width: 236, height: 122 },
}

const CardLabel = styled.span`
${theme.breakpoints.down("sm")} {
display: none;
}
`

const Certificate = styled.div`
border-radius: 4px;
background-color: ${theme.custom.colors.lightGray1};
Expand All @@ -38,7 +44,6 @@ const Certificate = styled.div`
${theme.breakpoints.down("md")} {
${{ ...theme.typography.body4 }}
background: none;
color: ${theme.custom.colors.darkGray2};
gap: 2px;
Expand All @@ -60,7 +65,6 @@ const Price = styled.div`
color: ${theme.custom.colors.darkGray2};
${theme.breakpoints.down("md")} {
${{ ...theme.typography.subtitle3 }}
color: ${theme.custom.colors.mitRed};
}
`

Expand Down Expand Up @@ -279,7 +283,7 @@ const StartDate: React.FC<{ resource: LearningResource }> = ({ resource }) => {

return (
<div>
{label} <span>{startDate}</span>
<CardLabel>{label}</CardLabel> <span>{startDate}</span>
</div>
)
}
Expand All @@ -289,7 +293,7 @@ const Format = ({ resource }: { resource: LearningResource }) => {
if (!format) return null
return (
<div>
Format: <span>{format}</span>
<CardLabel>Format:</CardLabel> <span>{format}</span>
</div>
)
}
Expand Down

0 comments on commit c1eb250

Please sign in to comment.