-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
54 lines (51 loc) · 1.18 KB
/
index.ts
File metadata and controls
54 lines (51 loc) · 1.18 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
interface ContentInterface {
type:
| "Code"
| "Text"
| "Image"
| "Quiz"
| "List" /*we can also do nested lists*/;
data: JSX.Element | string;
}
interface DocumentSection {
title: string;
content: ContentInterface[] | DocumentSection[];
}
interface ArticleInterface {
title: string;
image: string;
published: Date;
authorId: string;
numbered: boolean /*will be putten automatically*/;
contents: DocumentSection[];
}
const article: ArticleInterface = {
numbered: false,
image: "image.png",
published: new Date(),
authorId: "037374121436",
title: "Raiden's Article",
contents: [
{
title: "My First Title",
content: [{ type: "Text", data: "yoo am a description" }],
},
{
title: "My Second Title",
content: [{ type: "Text", data: "yooo am a description" }],
},
{
title: "My Third Title",
content: [
{
title: "Another Third Title - First",
content: [{ type: "Code", data: "yoo am a description" }],
},
{
title: "Another Third Title - Second",
content: [{ type: "Code", data: "yoo am a description" }],
},
],
},
],
};