Skip to content

Commit

Permalink
Merge pull request #421 from trilitech/link-tutorial-tiles
Browse files Browse the repository at this point in the history
Make the whole tutorial tile a link
  • Loading branch information
timothymcmackin authored Aug 7, 2024
2 parents 69d3a90 + e916f4d commit d4f447c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/TutorialCard/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';
import Link from '@docusaurus/Link';

export default function TutorialCard({ title, href, description, link, emoji }) {
return (
<div className={clsx(styles.tutorialcard)}>
<div>
<Link href={href} target="_self" className={clsx(styles.tutorialcardlinkcontainer)}>
<p className={clsx(styles.emoji)}>{emoji}</p>
<h3 className={clsx(styles.title)}>{title}</h3>
<p className={clsx(styles.description)}>{description}</p>
<a href={href} className={clsx(styles.link)}>
<p style={{ margin: 0 }}>{link}</p>
</a>
</div>
</Link>
</div>
);
}
7 changes: 5 additions & 2 deletions src/components/TutorialCard/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
.tutorialcard:hover {
border: 1px solid #787D82;
}
.tutorialcardlinkcontainer:hover {
text-decoration: none;
}

@media (max-width: 767px) {
.tutorialcard {
width: calc(100% - 20px);
margin: 10px 0;
width: calc(100% - 20px);
margin: 10px 0;
}
}

Expand Down

0 comments on commit d4f447c

Please sign in to comment.