1
- import { Fade , Notification , Search , Switcher } from "@carbon/icons-react" ;
2
1
import {
2
+ IbmDynamicRouteServer ,
3
+ LogoGithub ,
4
+ Notification ,
5
+ Search ,
6
+ } from "@carbon/icons-react" ;
7
+ import {
8
+ Column ,
3
9
Content ,
10
+ Grid ,
4
11
Header ,
5
12
HeaderContainer ,
6
13
HeaderGlobalAction ,
7
14
HeaderGlobalBar ,
8
- HeaderMenu ,
9
15
HeaderMenuButton ,
10
16
HeaderMenuItem ,
11
17
HeaderName ,
12
18
HeaderNavigation ,
13
- HeaderSideNavItems ,
14
- SideNav ,
15
- SideNavItems ,
16
- SideNavLink ,
17
- SideNavMenu ,
18
- SideNavMenuItem ,
19
19
SkipToContent ,
20
20
} from "@carbon/react" ;
21
21
import { Link , Outlet } from "react-router-dom" ;
22
22
import "./App.scss" ;
23
- import { Links } from "./router/links.models" ;
23
+ import { ExternalLinks , Links } from "./router/links.models" ;
24
24
25
25
function App ( ) {
26
26
const action = ( click : string ) => ( ) => {
@@ -39,23 +39,18 @@ function App() {
39
39
isActive = { isSideNavExpanded }
40
40
aria-expanded = { isSideNavExpanded }
41
41
/>
42
- < HeaderName href = "#" prefix = "" >
42
+ < HeaderName href = { ExternalLinks . Home } target = "_blank" prefix = "" >
43
+ < IbmDynamicRouteServer size = { 32 } style = { { marginRight : "1em" } } /> { " " }
43
44
Wanaku
44
45
</ HeaderName >
45
46
46
47
< HeaderNavigation aria-label = "Wanaku" >
47
48
< HeaderMenuItem as = { Link } to = { Links . Home } >
48
49
Home
49
50
</ HeaderMenuItem >
50
- < HeaderMenuItem as = { Link } to = { Links . About } >
51
- About
51
+ < HeaderMenuItem as = { Link } to = { Links . Tools } >
52
+ Tools
52
53
</ HeaderMenuItem >
53
- < HeaderMenuItem href = "#" > Link 3</ HeaderMenuItem >
54
- < HeaderMenu aria-label = "Link 4" menuLinkName = "Link 4" >
55
- < HeaderMenuItem href = "#one" > Sub-link 1</ HeaderMenuItem >
56
- < HeaderMenuItem href = "#two" > Sub-link 2</ HeaderMenuItem >
57
- < HeaderMenuItem href = "#three" > Sub-link 3</ HeaderMenuItem >
58
- </ HeaderMenu >
59
54
</ HeaderNavigation >
60
55
< HeaderGlobalBar >
61
56
< HeaderGlobalAction
@@ -71,103 +66,23 @@ function App() {
71
66
< Notification size = { 20 } />
72
67
</ HeaderGlobalAction >
73
68
< HeaderGlobalAction
74
- aria-label = "App Switcher"
75
- onClick = { action ( "app-switcher click" ) }
69
+ aria-label = "GitHub"
70
+ onClick = { ( ) => {
71
+ window . open ( ExternalLinks . GitHub , "_blank" ) ;
72
+ } }
76
73
tooltipAlignment = "end"
77
74
>
78
- < Switcher size = { 20 } />
75
+ < LogoGithub size = { 20 } />
79
76
</ HeaderGlobalAction >
80
77
</ HeaderGlobalBar >
81
- < SideNav
82
- aria-label = "Side navigation"
83
- expanded = { isSideNavExpanded }
84
- onSideNavBlur = { onClickSideNavExpand }
85
- href = "#main-content"
86
- >
87
- < SideNavItems >
88
- < HeaderSideNavItems hasDivider = { true } >
89
- < HeaderMenuItem href = "#" > Link 1</ HeaderMenuItem >
90
- < HeaderMenuItem href = "#" > Link 2</ HeaderMenuItem >
91
- < HeaderMenuItem href = "#" > Link 3</ HeaderMenuItem >
92
- < HeaderMenu aria-label = "Link 4" menuLinkName = "Link 4" >
93
- < HeaderMenuItem href = "#" > Sub-link 1</ HeaderMenuItem >
94
- < HeaderMenuItem href = "#" > Sub-link 2</ HeaderMenuItem >
95
- < HeaderMenuItem href = "#" > Sub-link 3</ HeaderMenuItem >
96
- </ HeaderMenu >
97
- </ HeaderSideNavItems >
98
- < SideNavMenu
99
- renderIcon = { Fade }
100
- title = "Category title"
101
- tabIndex = { 0 }
102
- >
103
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
104
- Link 5
105
- </ SideNavMenuItem >
106
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
107
- Link 6
108
- </ SideNavMenuItem >
109
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
110
- Link 7
111
- </ SideNavMenuItem >
112
- </ SideNavMenu >
113
- < SideNavMenu
114
- renderIcon = { Fade }
115
- title = "Category title"
116
- tabIndex = { 0 }
117
- >
118
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
119
- Link 8
120
- </ SideNavMenuItem >
121
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
122
- Link 9
123
- </ SideNavMenuItem >
124
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
125
- Link 10
126
- </ SideNavMenuItem >
127
- </ SideNavMenu >
128
- < SideNavMenu
129
- renderIcon = { Fade }
130
- title = "Category title"
131
- isActive = { true }
132
- tabIndex = { 0 }
133
- >
134
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
135
- Link 11
136
- </ SideNavMenuItem >
137
- < SideNavMenuItem
138
- aria-current = "page"
139
- href = "https://www.carbondesignsystem.com/"
140
- >
141
- Link 12
142
- </ SideNavMenuItem >
143
- < SideNavMenuItem href = "https://www.carbondesignsystem.com/" >
144
- Link 13
145
- </ SideNavMenuItem >
146
- </ SideNavMenu >
147
- < SideNavLink
148
- renderIcon = { Fade }
149
- href = "https://www.carbondesignsystem.com/"
150
- >
151
- Link
152
- </ SideNavLink >
153
- < SideNavLink
154
- renderIcon = { Fade }
155
- href = "https://www.carbondesignsystem.com/"
156
- >
157
- Link
158
- </ SideNavLink >
159
- </ SideNavItems >
160
- </ SideNav >
161
78
</ Header >
162
79
163
80
< Content id = "main-content" >
164
- < div className = "cds--grid" >
165
- < div className = "cds--row" >
166
- < div className = "cds--col-lg-13 cds--offset-lg-3" >
167
- < Outlet />
168
- </ div >
169
- </ div >
170
- </ div >
81
+ < Grid fullWidth >
82
+ < Column lg = { 16 } md = { 8 } sm = { 4 } >
83
+ < Outlet />
84
+ </ Column >
85
+ </ Grid >
171
86
</ Content >
172
87
</ >
173
88
) }
0 commit comments