-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSideDrawer.js
More file actions
48 lines (46 loc) · 1.03 KB
/
Copy pathSideDrawer.js
File metadata and controls
48 lines (46 loc) · 1.03 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
/* eslint-disable import/no-extraneous-dependencies */
import React from "react";
import { NavLink } from "react-router-dom";
import {
DrawerBg,
DrawerWrapper,
DrawerLinksList,
DrawerLinkItem,
} from "./SideDrawer.style";
export default function SideDrawer() {
const links = [
{
title: "Getting Started",
link: "/getting-started",
},
{
title: "Demo",
link: "/demo",
},
{
title: "About",
link: "/about",
},
{
title: "Github",
link: "https://github.com/opensource9ja/dnotebook-react",
},
];
return (
<DrawerBg>
<DrawerWrapper>
<DrawerLinksList>
{links.map((item, idx) => (
<DrawerLinkItem key={`NavLink${idx}`}>
{item.link.includes(":") ? (
<a href={item.link}>{item.title}</a>
) : (
<NavLink to={item.link}>{item.title}</NavLink>
)}
</DrawerLinkItem>
))}
</DrawerLinksList>
</DrawerWrapper>
</DrawerBg>
);
}