Skip to content

Commit

Permalink
fix: set minicard to be clickable not just image
Browse files Browse the repository at this point in the history
  • Loading branch information
timkim committed Jun 7, 2023
1 parent 8af45a3 commit c293c01
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ const Minicard = ({
}) => {
const Element = link ? GatsbyLink : 'div';
return (
<div

<Element
to={href(link)}
css={css`
display: flex;
text-decoration: none;
justify-content: ${!heading && !text && "center"}
Expand All @@ -56,13 +57,11 @@ const Minicard = ({
@media screen and (max-width: ${MIN_MOBILE_SCREEN_WIDTH}) {
max-width: calc(${layoutColumns(3.5)}) !important;
}
}
`}
>
{image ? (
<Element
to={href(link)}
<div
css={css`
width:100px;
height:80px
Expand All @@ -88,7 +87,7 @@ const Minicard = ({
>
<HeroImage image={image} />
</h2>
</Element>
</div>
) : null}

{text !== undefined || heading !== undefined ? (
Expand Down Expand Up @@ -153,7 +152,7 @@ const Minicard = ({

</div>
) : null}
</div>
</Element>
);
};

Expand Down

0 comments on commit c293c01

Please sign in to comment.