-
Notifications
You must be signed in to change notification settings - Fork 451
/
index.js
101 lines (94 loc) · 3.21 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import Link from '@docusaurus/Link'
import { translate } from '@docusaurus/Translate'
import useBaseUrl from '@docusaurus/useBaseUrl'
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
import Layout from '@theme/Layout'
import clsx from 'clsx'
import React from 'react'
import styles from './styles.module.css'
const features = [
{
title: 'Easy to Use',
description: <>Several Jest presets to let you start quickly with testing.</>,
},
{
title: 'Full TypeScript features',
description: <>Support all available TypeScript features including type checking.</>,
},
{
title: 'Babel support',
description: <>Support working in combination with Babel</>,
},
]
function Feature({ imageUrl, title, description }) {
const imgUrl = useBaseUrl(imageUrl)
return (
<div className={clsx('col', styles.section)}>
{imgUrl && (
<div className="text--center">
<img className={styles.featureImage} src={imgUrl} alt={title} />
</div>
)}
<h3 className={clsx(styles.featureHeading)}>{title}</h3>
<p className="padding-horiz--md">{description}</p>
</div>
)
}
function Home() {
const context = useDocusaurusContext()
const { siteConfig: { tagline } = {} } = context
return (
<Layout title={tagline} description={tagline}>
<header>
<div className={styles.hero}>
<div className={styles.heroInner}>
<h1 className={styles.heroProjectTagline}>
<img
alt={translate({ message: 'Docusaurus with Keytar' })}
className={styles.heroLogo}
src={useBaseUrl('/img/logo.svg')}
/>
<span className={styles.heroTitleTextHtml}>
Delightful testing with <b>Jest</b> and <b>TypeScript</b>
</span>
</h1>
<div className={styles.indexCtas}>
<Link className={clsx('button button--primary button--lg')} to={useBaseUrl('docs/')}>
Get Started
</Link>
<span className={styles.indexCtasGitHubButtonWrapper}>
<iframe
className={styles.indexCtasGitHubButton}
src="https://ghbtns.com/github-btn.html?user=kulshekhar&repo=ts-jest&type=star&count=true&size=large"
width={160}
height={30}
title="GitHub Stars"
/>
</span>
</div>
</div>
</div>
<div className={clsx(styles.announcement, styles.announcementDark)}>
<div className={styles.announcementInner}>
Coming from v23.10? Check out our <Link to="/docs/migration">v23.10 to latest version migration guide</Link>
.
</div>
</div>
</header>
<main>
{features && features.length > 0 && (
<section className={styles.section}>
<div className="container text--center">
<div className="row">
{features.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
)}
</main>
</Layout>
)
}
export default Home