Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quantum-kittens
GitHub Repository: quantum-kittens/platypus
Path: blob/main/frontend/constants/menuLinks.ts
3855 views
1
type SegmentData = {
2
action?: string,
3
cta?: string,
4
location?: string
5
}
6
7
/**
8
* Represent a navigation link for the menus of the site
9
*/
10
interface NavLink {
11
/** The visible name of the link */
12
label: string
13
/** Where we want to go */
14
url: string
15
/** Includes an object with the information of the action. Example:
16
* ```ts
17
* {
18
action: 'Qiskit Community: GitHub'
19
}
20
```
21
*/
22
segment?: SegmentData
23
/** Only for <a> links. Use `_blank` to open the link in a new tab */
24
target?: string
25
/** Only for <a> links. Specifies the relationship between the current document
26
* and the linked document. Possible values: `nofollow`, `noreferrer`, `noopener`,
27
* `me` or a combination of them
28
*/
29
rel?: string
30
/** The visible icon of the link */
31
icon?: 'LogoTwitter20'|'LogoSlack20'|'LogoYouTube20'|'LogoMedium20'
32
/**
33
* TODO: This is for enabling a quick fix of a menu hierarchy for addressing:
34
* https://github.com/Qiskit/qiskit.org/issues/700
35
*
36
* If we are going to deal with link hierarchies, it is better to keep
37
* separated NavLink instances from HierarchyNode instances. For instance
38
* creating a node made of a root and children or providing a ParentNode
39
* interface a-la HTML DOM.
40
*/
41
sublinks?: NavLink[]
42
}
43
44
export type { NavLink }
45
46