|
1 | | -import type {ReactNode} from 'react'; |
2 | | -import clsx from 'clsx'; |
3 | | -import Heading from '@theme/Heading'; |
| 1 | +import type {ReactElement} from 'react'; |
4 | 2 | import styles from './styles.module.css'; |
5 | | - |
6 | | -type FeatureItem = { |
7 | | - title: string; |
8 | | - Svg: React.ComponentType<React.ComponentProps<'svg'>>; |
9 | | - description: ReactNode; |
10 | | -}; |
11 | | - |
12 | | -const FeatureList: FeatureItem[] = [ |
13 | | - { |
14 | | - title: 'Backup your clusters', |
15 | | - Svg: require('@site/static/img/undraw_going-up_g8av.svg').default, |
16 | | - description: ( |
17 | | - <> |
18 | | - Securely backup your CloudNativePG clusters to object storage with |
19 | | - configurable retention policies and compression options. |
20 | | - </> |
21 | | - ), |
22 | | - }, |
23 | | - { |
24 | | - title: 'Restore to any point in time', |
25 | | - Svg: require('@site/static/img/undraw_season-change_ohe6.svg').default, |
26 | | - description: ( |
27 | | - <> |
28 | | - Perform flexible restores to any point in time using a combination of |
29 | | - base backups and WAL archives. |
30 | | - </> |
31 | | - ), |
32 | | - }, |
33 | | - { |
34 | | - title: 'Cloud-native architecture', |
35 | | - Svg: require('@site/static/img/undraw_maintenance_rjtm.svg').default, |
36 | | - description: ( |
37 | | - <> |
38 | | - Seamlessly integrate with all major cloud providers and on-premises object storage |
39 | | - solutions. |
40 | | - </> |
41 | | - ), |
42 | | - }, |
43 | | -]; |
44 | | - |
45 | | -function Feature({title, Svg, description}: FeatureItem) { |
46 | | - return ( |
47 | | - <div className={clsx('col col--4')}> |
48 | | - <div className="text--center"> |
49 | | - <Svg className={styles.featureSvg} role="img" /> |
50 | | - </div> |
51 | | - <div className="text--center padding-horiz--md"> |
52 | | - <Heading as="h3">{title}</Heading> |
53 | | - <p>{description}</p> |
54 | | - </div> |
55 | | - </div> |
56 | | - ); |
57 | | -} |
58 | | - |
59 | | -export default function HomepageFeatures(): ReactNode { |
60 | | - return ( |
61 | | - <section className={styles.features}> |
62 | | - <div className="container"> |
63 | | - <div className="row"> |
64 | | - {FeatureList.map((props, idx) => ( |
65 | | - <Feature key={idx} {...props} /> |
66 | | - ))} |
67 | | - </div> |
68 | | - </div> |
69 | | - </section> |
70 | | - ); |
| 3 | +import {FeatureList} from './feature'; |
| 4 | + |
| 5 | +export default function HomepageFeatures(): ReactElement<null> { |
| 6 | + return ( |
| 7 | + <section className={styles.features}> |
| 8 | + <div className="container"> |
| 9 | + <FeatureList/> |
| 10 | + </div> |
| 11 | + </section> |
| 12 | + ); |
71 | 13 | } |
0 commit comments