-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidebar.js
More file actions
117 lines (110 loc) · 1.89 KB
/
Copy pathSidebar.js
File metadata and controls
117 lines (110 loc) · 1.89 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import React from 'react';
import { Link } from 'gatsby';
import { css } from '@emotion/core';
import { sidebarWidth, textColor, themeColor } from '../styles';
const sidebarLinks = [
{
name: 'Home',
ref: '/',
},
{
name: 'Button',
ref: '/button',
},
{
name: 'Input',
ref: '/input',
},
{
name: 'Modal',
ref: '/modal',
},
{
name: 'Switch',
ref: '/switch',
},
{
name: 'Pill',
ref: '/pill',
},
{
name: 'ButtonGroup',
ref: '/buttonGroup',
},
{
name: 'InputGroup',
ref: '/inputGroup',
},
{
name: 'Collapse',
ref: '/collapse',
},
{
name: 'BreadCrumbs',
ref: '/breadcrumbs',
},
{
name: 'Theming',
ref: '/theming',
},
{
name: 'DropDownMenu',
ref: '/dropdownMenu',
},
{
name: 'Tabs',
ref: '/tab',
},
{
name:'Table',
ref:'/table'
}
];
export const cssNavLink = css`
font-size: 16px;
text-decoration: none;
padding: 6px 24px;
color: ${textColor};
position: relative;
z-index: 2;
&:hover {
color: ${themeColor};
border-right: 4px solid ${themeColor};
}
&.active {
color: ${themeColor};
border-right: 4px solid ${themeColor};
}
`;
export const cssActiveNavLink = css``;
function Sidebar() {
return (
<aside
css={css`
min-width: ${sidebarWidth}px;
width: ${sidebarWidth}px;
position: fixed;
left: 0;
height: 100%;
background-color: #f8f8f8;
border-right: 1px solid #e8e8e8;
`}
>
<nav
css={css`
flex: 1;
display: flex;
flex-direction: column;
margin-top: 12px;
`}
>
{sidebarLinks.map(({ name, ref }) => (
<Link key={ref} to={ref} css={cssNavLink} activeClassName="active">
{name}
</Link>
))}
</nav>
</aside>
);
}
export default Sidebar;