forked from TypeStrong/typedoc
/
header.tsx
86 lines (81 loc) · 4.11 KB
/
header.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import type { Reflection } from "../../../../models";
import { JSX } from "../../../../utils";
import type { PageEvent } from "../../../events";
import { hasTypeParameters, join, renderFlags } from "../../lib";
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
export const header = (context: DefaultThemeRenderContext, props: PageEvent<Reflection>) => (
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-base={context.relativeURL("./")}>
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">
Search
</label>
<input type="text" id="tsd-search-field" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href={context.relativeURL("index.html")} class="title">
{props.project.name}
</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">
Options
</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">
All
</li>
</ul>
</div>{" "}
<input type="checkbox" id="tsd-filter-inherited" checked={true} />
<label class="tsd-widget" for="tsd-filter-inherited">
Inherited
</label>
{!context.options.getValue("excludeExternals") && (
<>
<input type="checkbox" id="tsd-filter-externals" checked={true} />
<label class="tsd-widget" for="tsd-filter-externals">
Externals
</label>
</>
)}
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">
Menu
</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
{!!props.model.parent && <ul class="tsd-breadcrumb">{context.breadcrumb(props.model)}</ul>}
<h1>
{props.model.kindString !== "Project" && `${props.model.kindString ?? ""} `}
{props.model.name}
{hasTypeParameters(props.model) && (
<>
{"<"}
{join(", ", props.model.typeParameters, (item) => item.name)}
{">"}
</>
)}{" "}
{renderFlags(props.model.flags)}
</h1>
</div>
</div>
</header>
);