-
-
Notifications
You must be signed in to change notification settings - Fork 213
Expand file tree
/
Copy pathSidebar.tsx
More file actions
52 lines (50 loc) · 1.32 KB
/
Sidebar.tsx
File metadata and controls
52 lines (50 loc) · 1.32 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
import React from "react";
import { Link } from "react-router-dom";
import {
SidebarContainer,
SidebarTitle,
SidebarList,
SidebarListItem,
SidebarLink,
HelperBox,
HelperIcon,
HelperText,
DividerLine,
} from "../styles/components/Sidebar";
import { BulbOutlined } from "@ant-design/icons";
const Sidebar: React.FC<{ steps: { title: string; link: string }[] }> = ({
steps,
}) => {
return (
<SidebarContainer>
<SidebarTitle>Learning Pathway</SidebarTitle>
<SidebarList>
{steps.map((step, index) => (
<SidebarListItem key={index}>
<SidebarLink
to={step.link}
className={({ isActive }) => (isActive ? "active" : undefined)}
>
{step.title}
</SidebarLink>
</SidebarListItem>
))}
</SidebarList>
<DividerLine />
<HelperBox>
<HelperIcon>
<BulbOutlined />
</HelperIcon>
<HelperText>
Welcome to the Learning Pathway! Use the sidebar to follow the guide.
Open the{" "}
<Link to="/" target="_blank" rel="noopener noreferrer">
Template Playground
</Link>{" "}
in another tab to experiment as you learn.
</HelperText>
</HelperBox>
</SidebarContainer>
);
};
export default Sidebar;