Skip to content

Commit e22a1a6

Browse files
authored
Merge pull request #13 from ts-graphviz/use-docusaurus-components
Update to use docusaurus components
2 parents c985f48 + 4b40ecb commit e22a1a6

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/components/Features/Features.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ const features = [
6666

6767
const Features: React.FC = () => (
6868
<section id="features" className={styles.features}>
69-
<h2>
69+
<Heading as="h2">
7070
<Translate id="Features.title">Why Choose ts-graphviz?</Translate>
71-
</h2>
71+
</Heading>
7272
<div className={styles.featureList}>
7373
{features.map(({ title, Svg, description }) => (
7474
<div key={title} className={styles.featureItem}>

src/components/HeroSection/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ const HeroSection: React.FC = () => {
4242
<Link className="button button--secondary button--lg" to="/playground">
4343
<Translate id="HeroSection.playground">Playground 🎡</Translate>
4444
</Link>
45-
<a
45+
<Link
4646
className="button button--secondary button--lg"
47-
href="https://ts-graphviz.github.io/ts-graphviz/"
47+
to="https://ts-graphviz.github.io/ts-graphviz/"
4848
>
49-
<Translate id="HeroSection.api">API Refarence 📖</Translate>
50-
</a>
49+
<Translate id="HeroSection.api">API Reference 📖</Translate>{' '}
50+
</Link>
5151
</div>
5252
{init ? (
5353
<Particles

src/components/Tools/Tools.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import Link from '@docusaurus/Link';
12
import Translate, { translate } from '@docusaurus/Translate';
3+
import Heading from '@theme/Heading';
24
import styles from './Tools.module.css';
35

46
// NOTE: Get icons from https://simpleicons.org/
@@ -43,20 +45,20 @@ const tools = [
4345

4446
const Tools: React.FC = () => (
4547
<section id="tools" className={styles.tools}>
46-
<h2>
48+
<Heading as="h2">
4749
<Translate id="Tools.title">Our Tools and Libraries</Translate>
48-
</h2>
50+
</Heading>
4951
<div className={styles.toolList}>
5052
{tools.map((tool) => (
5153
<div key={tool.name} className={styles.toolItem}>
5254
<div className={styles.toolItemHeader}>
53-
<h3>{tool.name}</h3>
55+
<Heading as="h3">{tool.name}</Heading>
5456
<tool.Svg fill={tool.fill} className={styles.toolSvg} role="img" />
5557
</div>
5658
<p>{tool.description}</p>
57-
<a href={tool.link} target="_blank" rel="noopener noreferrer">
59+
<Link to={tool.link} target="_blank" rel="noopener noreferrer">
5860
<Translate id="Tools.learnMore">Learn More</Translate>
59-
</a>
61+
</Link>
6062
</div>
6163
))}
6264
</div>

0 commit comments

Comments
 (0)