forked from openvinotoolkit/openvino.genai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
38 lines (34 loc) · 903 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
import Link from '@docusaurus/Link';
import { Children } from 'react';
type BaseModelsTableProps = {
headers: string[];
rows: React.JSX.Element[];
};
export function BaseModelsTable({ headers, rows }: BaseModelsTableProps): React.JSX.Element {
return (
<table>
<thead>
<tr>
{headers.map((v) => (
<th key={v}>{v}</th>
))}
</tr>
</thead>
<tbody style={{ verticalAlign: 'baseline' }}>{Children.map(rows, (row) => row)}</tbody>
</table>
);
}
export const LinksCell = ({ links }: { links: string[] }) => (
<td>
<ul>
{links.map((link) => (
<li key={link}>
<Link href={link}>{new URL(link).pathname.slice(1)}</Link>
</li>
))}
</ul>
</td>
);
export const StatusCell = ({ value }: { value: boolean }) => (
<td style={{ textAlign: 'center' }}>{value ? '✅' : '❌'}</td>
);