|
1 | 1 | import React from 'react';
|
2 | 2 | import clsx from 'clsx';
|
3 | 3 | import styles from './styles.module.css';
|
| 4 | +import Heading from '@theme/Heading'; |
4 | 5 |
|
5 | 6 | const FeatureList = [
|
6 |
| - { |
7 |
| - title: 'Easy to Use', |
8 |
| - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, |
9 |
| - description: ( |
10 |
| - <> |
11 |
| - Docusaurus was designed from the ground up to be easily installed and |
12 |
| - used to get your website up and running quickly. |
13 |
| - </> |
14 |
| - ), |
15 |
| - }, |
16 |
| - { |
17 |
| - title: 'Focus on What Matters', |
18 |
| - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, |
19 |
| - description: ( |
20 |
| - <> |
21 |
| - Docusaurus lets you focus on your docs, and we'll do the chores. Go |
22 |
| - ahead and move your docs into the <code>docs</code> directory. |
23 |
| - </> |
24 |
| - ), |
25 |
| - }, |
26 |
| - { |
27 |
| - title: 'Powered by React', |
28 |
| - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, |
29 |
| - description: ( |
30 |
| - <> |
31 |
| - Extend or customize your website layout by reusing React. Docusaurus can |
32 |
| - be extended while reusing the same header and footer. |
33 |
| - </> |
34 |
| - ), |
35 |
| - }, |
| 7 | + { |
| 8 | + title: 'Easy to Use', |
| 9 | + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, |
| 10 | + description: <>Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly.</> |
| 11 | + }, |
| 12 | + { |
| 13 | + title: 'Focus on What Matters', |
| 14 | + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, |
| 15 | + description: ( |
| 16 | + <> |
| 17 | + Docusaurus lets you focus on your docs, and we'll do the chores. Go ahead and move your docs into the <code>docs</code> directory. |
| 18 | + </> |
| 19 | + ) |
| 20 | + }, |
| 21 | + { |
| 22 | + title: 'Powered by React', |
| 23 | + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, |
| 24 | + description: <>Extend or customize your website layout by reusing React. Docusaurus can be extended while reusing the same header and footer.</> |
| 25 | + } |
36 | 26 | ];
|
37 | 27 |
|
38 |
| -function Feature({Svg, title, description}) { |
39 |
| - return ( |
40 |
| - <div className={clsx('col col--4')}> |
41 |
| - <div className="text--center"> |
42 |
| - <Svg className={styles.featureSvg} role="img" /> |
43 |
| - </div> |
44 |
| - <div className="text--center padding-horiz--md"> |
45 |
| - <h3>{title}</h3> |
46 |
| - <p>{description}</p> |
47 |
| - </div> |
48 |
| - </div> |
49 |
| - ); |
| 28 | +function Feature({ Svg, title, description }) { |
| 29 | + return ( |
| 30 | + <div className={clsx('col col--4')}> |
| 31 | + <div className="text--center"> |
| 32 | + <Svg className={styles.featureSvg} role="img" /> |
| 33 | + </div> |
| 34 | + <div className="text--center padding-horiz--md"> |
| 35 | + <Heading as="h1">{title}</Heading> |
| 36 | + <p>{description}</p> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + ); |
50 | 40 | }
|
51 | 41 |
|
52 | 42 | export default function HomepageFeatures() {
|
53 |
| - return ( |
54 |
| - <section className={styles.features}> |
55 |
| - <div className="container"> |
56 |
| - <div className="row"> |
57 |
| - {FeatureList.map((props, idx) => ( |
58 |
| - <Feature key={idx} {...props} /> |
59 |
| - ))} |
60 |
| - </div> |
61 |
| - </div> |
62 |
| - </section> |
63 |
| - ); |
| 43 | + return ( |
| 44 | + <section className={styles.features}> |
| 45 | + <div className="container"> |
| 46 | + <div className="row"> |
| 47 | + {FeatureList.map((props, idx) => ( |
| 48 | + <Feature key={idx} {...props} /> |
| 49 | + ))} |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </section> |
| 53 | + ); |
64 | 54 | }
|
0 commit comments