/
index.tsx
40 lines (37 loc) · 958 Bytes
/
index.tsx
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
import sponsors from '@site/data/sponsors.json';
import clsx from 'clsx';
import React from 'react';
import styles from './styles.module.css';
import { Sponsor } from '../Sponsor';
import { SponsorIncludeOptions } from '../types';
interface SponsorsProps {
className: string;
description: string;
include?: SponsorIncludeOptions;
expanded?: boolean;
tier?: string;
title: string;
}
export function Sponsors({
className,
description,
include,
tier,
title,
}: SponsorsProps): JSX.Element {
return (
<div className={clsx(styles.tierArea, className)}>
<h3>{title}</h3>
<p>{description}</p>
<ul className={clsx(styles.sponsorsTier, styles[`tier-${tier}`])}>
{sponsors
.filter(sponsor => sponsor.tier === tier)
.map(sponsor => (
<li key={sponsor.id}>
<Sponsor include={include} sponsor={sponsor} />
</li>
))}
</ul>
</div>
);
}