mirror of
https://github.com/SantaSpeen/santaspeen.ru-blog.git
synced 2026-10-27 14:40:05 +00:00
to TypeScript
This commit is contained in:
1 parent
7b121b4861
commit
f85f2dc3ae
45 files changed
+2710
-1101
No files matched your search
+9
-3
@@ -2,7 +2,13 @@ import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
const FeatureList = [
|
||||
type FeatureItem = {
|
||||
title: string;
|
||||
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
|
||||
description: JSX.Element;
|
||||
};
|
||||
|
||||
const FeatureList: FeatureItem[] = [
|
||||
{
|
||||
title: 'Easy to Use',
|
||||
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
|
||||
@@ -35,7 +41,7 @@ const FeatureList = [
|
||||
},
|
||||
];
|
||||
|
||||
function Feature({Svg, title, description}) {
|
||||
function Feature({title, Svg, description}: FeatureItem) {
|
||||
return (
|
||||
<div className={clsx('col col--4')}>
|
||||
<div className="text--center">
|
||||
@@ -49,7 +55,7 @@ function Feature({Svg, title, description}) {
|
||||
);
|
||||
}
|
||||
|
||||
export default function HomepageFeatures() {
|
||||
export default function HomepageFeatures(): JSX.Element {
|
||||
return (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
Reference in new issue
Block a user