forked from nodejs/nodejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
37 lines (31 loc) · 1.04 KB
/
index.tsx
File metadata and controls
37 lines (31 loc) · 1.04 KB
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
import Skeleton from '@node-core/ui-components/Common/Skeleton';
import Tooltip from '@node-core/ui-components/Common/Tooltip';
import { cloneElement } from 'react';
import Button from '#site/components/Common/Button';
import type { Partners } from '#site/types';
import type { ComponentProps, FC } from 'react';
import style from './index.module.css';
type PartnersIconProps = Partners & ComponentProps<typeof Skeleton>;
const PartnersIcon: FC<PartnersIconProps> = ({ name, href, logo, loading }) => (
<Skeleton loading={loading} className="size-9 p-2">
<Tooltip
content={
<div className="p-2 text-neutral-900 dark:text-neutral-200">{name}</div>
}
>
<Button
kind="secondary"
href={`${href}/?utm_source=nodejs-website&utm_medium=Link`}
rel="sponsored noopener"
target="_blank"
className={style.partnerIcon}
>
{cloneElement(logo, {
width: '100%',
height: '16px',
})}
</Button>
</Tooltip>
</Skeleton>
);
export default PartnersIcon;