-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathnodes.tsx
More file actions
52 lines (50 loc) · 985 Bytes
/
nodes.tsx
File metadata and controls
52 lines (50 loc) · 985 Bytes
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
41
42
43
44
45
46
47
48
49
50
51
52
import { Fence } from '@devfile-web/core';
import Link from 'next/link';
import { nodes as defaultNodes } from '@markdoc/markdoc';
const nodes = {
document: {
render: undefined,
},
table: {
...defaultNodes.table,
render: (props): JSX.Element => (
<div className="overflow-x-auto">
<table {...props} />
</div>
),
},
th: {
...defaultNodes.th,
attributes: {
...defaultNodes.th.attributes,
scope: {
type: String,
default: 'col',
},
},
render: (props): JSX.Element => <th {...props} />,
},
fence: {
render: Fence,
attributes: {
language: {
type: String,
},
title: {
type: String,
},
filename: {
type: String,
},
},
},
link: {
render: (props): JSX.Element => <Link data-testid="generated-link" {...props} />,
attributes: {
href: {
type: String,
},
},
},
};
export default nodes;