l-min-components 1.0.503 → 1.0.511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/adminSvg/alertIcon.jsx +64 -0
- package/src/assets/adminSvg/analyticsIcon.jsx +30 -0
- package/src/assets/adminSvg/chatIcon.jsx +36 -0
- package/src/assets/adminSvg/cmsIcon.jsx +78 -0
- package/src/assets/adminSvg/dashboardIcon.jsx +78 -0
- package/src/assets/adminSvg/flaggedIcon.jsx +30 -0
- package/src/assets/adminSvg/revenueIcon.jsx +32 -0
- package/src/assets/adminSvg/settingsIcon.jsx +30 -0
- package/src/assets/adminSvg/ticketsIcon.jsx +70 -0
- package/src/assets/adminSvg/usersIcon.jsx +70 -0
- package/src/components/AdminAppMainLayout/index.jsx +48 -0
- package/src/components/AdminAppMainLayout/index.styled.js +43 -0
- package/src/components/AdminNavbar/assets/images/User-avatar.svg.png +0 -0
- package/src/components/AdminNavbar/assets/images/logo.png +0 -0
- package/src/components/AdminNavbar/assets/svg/add.jsx +14 -0
- package/src/components/AdminNavbar/assets/svg/arrow-down.jsx +17 -0
- package/src/components/AdminNavbar/assets/svg/book.jsx +34 -0
- package/src/components/AdminNavbar/assets/svg/chevron-ddown.jsx +14 -0
- package/src/components/AdminNavbar/assets/svg/close.jsx +15 -0
- package/src/components/AdminNavbar/assets/svg/coolicon.svg +3 -0
- package/src/components/AdminNavbar/assets/svg/message.jsx +39 -0
- package/src/components/AdminNavbar/assets/svg/notification.jsx +32 -0
- package/src/components/AdminNavbar/assets/svg/people.jsx +17 -0
- package/src/components/AdminNavbar/assets/svg/search.jsx +39 -0
- package/src/components/AdminNavbar/index.jsx +63 -0
- package/src/components/AdminNavbar/index.styled.js +202 -0
- package/src/components/AdminSidebar/assets/images/logo.png +0 -0
- package/src/components/AdminSidebar/assets/svg/chevronIcon.jsx +32 -0
- package/src/components/AdminSidebar/assets/svg/logoutIcon.jsx +54 -0
- package/src/components/AdminSidebar/index.jsx +150 -0
- package/src/components/AdminSidebar/index.styled.js +296 -0
- package/src/components/fullPageLoader/index.jsx +22 -11
- package/src/components/fullPageLoader/loader.jsx +4 -4
- package/src/components/index.js +1 -0
- package/src/hooks/adminSideMenuItems.jsx +253 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React, { useState, useRef } from "react";
|
|
2
|
+
import { NavLink } from "react-router-dom";
|
|
3
|
+
import {
|
|
4
|
+
NavigationContainer,
|
|
5
|
+
SideMenuContainer,
|
|
6
|
+
SideMenuDropdownBody,
|
|
7
|
+
SideMenuDropdownHeader,
|
|
8
|
+
NavWrapper,
|
|
9
|
+
} from "./index.styled";
|
|
10
|
+
import { adminSideMenuOptions } from "../../hooks/adminSideMenuItems";
|
|
11
|
+
import logo from "./assets/images/logo.png";
|
|
12
|
+
import { ChevronIconActive } from "./assets/svg/chevronIcon";
|
|
13
|
+
import cx from "classnames";
|
|
14
|
+
import { LogoutIcon } from "./assets/svg/logoutIcon";
|
|
15
|
+
|
|
16
|
+
const AdminSideMenu = () => {
|
|
17
|
+
const [activeDropdown, setActiveDropdown] = useState(null);
|
|
18
|
+
const ref = useRef(null);
|
|
19
|
+
|
|
20
|
+
const handleToggle = (index) => {
|
|
21
|
+
if (activeDropdown === index) {
|
|
22
|
+
setActiveDropdown(null);
|
|
23
|
+
} else {
|
|
24
|
+
setActiveDropdown(index);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<SideMenuContainer>
|
|
31
|
+
<div className="logo_section">
|
|
32
|
+
<img src={logo} alt="" />
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<NavWrapper>
|
|
36
|
+
{adminSideMenuOptions?.map((item, idx) => (
|
|
37
|
+
<div key={idx}>
|
|
38
|
+
<NavigationContainer>
|
|
39
|
+
{item?.optionType && (
|
|
40
|
+
<p className="menu_title"> {item?.optionType}</p>
|
|
41
|
+
)}
|
|
42
|
+
|
|
43
|
+
{item?.routes.map((item, idx) => (
|
|
44
|
+
<div key={idx}>
|
|
45
|
+
{!item?.hasDropdown && (
|
|
46
|
+
<NavLink to={item?.path}>
|
|
47
|
+
{({ isActive }) => {
|
|
48
|
+
return isActive ? (
|
|
49
|
+
<span
|
|
50
|
+
id="navlink__title"
|
|
51
|
+
className={isActive ? "active-link" : ""}
|
|
52
|
+
>
|
|
53
|
+
{item?.iconActive} {item?.text}
|
|
54
|
+
{item?.hasNotification && (
|
|
55
|
+
<span className="dropdown_notification">
|
|
56
|
+
{item?.notifications}
|
|
57
|
+
</span>
|
|
58
|
+
)}
|
|
59
|
+
</span>
|
|
60
|
+
) : (
|
|
61
|
+
<span id="navlink__title" className="">
|
|
62
|
+
{item?.icon} {item?.text}
|
|
63
|
+
{item?.hasNotification && (
|
|
64
|
+
<span className="dropdown_notification">
|
|
65
|
+
{item?.notifications}
|
|
66
|
+
</span>
|
|
67
|
+
)}
|
|
68
|
+
</span>
|
|
69
|
+
);
|
|
70
|
+
}}
|
|
71
|
+
</NavLink>
|
|
72
|
+
)}
|
|
73
|
+
|
|
74
|
+
{item?.hasDropdown && (
|
|
75
|
+
<>
|
|
76
|
+
<SideMenuDropdownHeader
|
|
77
|
+
className={`${
|
|
78
|
+
activeDropdown === idx ? "active-dropdown" : ""
|
|
79
|
+
}`}
|
|
80
|
+
onClick={() => handleToggle(idx)}
|
|
81
|
+
>
|
|
82
|
+
<span className="dropdown_header_txt">
|
|
83
|
+
{activeDropdown === idx ? (
|
|
84
|
+
<> {item?.iconActive}</>
|
|
85
|
+
) : (
|
|
86
|
+
<>{item?.icon} </>
|
|
87
|
+
)}
|
|
88
|
+
|
|
89
|
+
{item?.text}
|
|
90
|
+
</span>
|
|
91
|
+
|
|
92
|
+
<span className="dropdown_header_chevron">
|
|
93
|
+
<ChevronIconActive
|
|
94
|
+
style={{
|
|
95
|
+
transform:
|
|
96
|
+
activeDropdown === idx ? "rotate(180deg)" : " ",
|
|
97
|
+
}}
|
|
98
|
+
fill={activeDropdown === idx ? "#fff" : "#636666"}
|
|
99
|
+
/>
|
|
100
|
+
</span>
|
|
101
|
+
</SideMenuDropdownHeader>
|
|
102
|
+
|
|
103
|
+
<SideMenuDropdownBody
|
|
104
|
+
ref={ref}
|
|
105
|
+
className={`rc-collapse ${
|
|
106
|
+
activeDropdown === idx ? "show" : ""
|
|
107
|
+
}`}
|
|
108
|
+
style={
|
|
109
|
+
activeDropdown === idx
|
|
110
|
+
? { height: "auto" }
|
|
111
|
+
: { height: "0px" }
|
|
112
|
+
}
|
|
113
|
+
>
|
|
114
|
+
{item?.dropdownItems?.map((item, idx) => (
|
|
115
|
+
<div className="dropdown_row" key={idx}>
|
|
116
|
+
<NavLink
|
|
117
|
+
to={item?.path}
|
|
118
|
+
id="dropdown__links"
|
|
119
|
+
className={({ isActive }) =>
|
|
120
|
+
isActive ? "active" : ""
|
|
121
|
+
}
|
|
122
|
+
>
|
|
123
|
+
{item?.text}
|
|
124
|
+
</NavLink>
|
|
125
|
+
|
|
126
|
+
{item?.hasNotification && (
|
|
127
|
+
<span className="dropdown_notification">
|
|
128
|
+
{item?.notifications}
|
|
129
|
+
</span>
|
|
130
|
+
)}
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</SideMenuDropdownBody>
|
|
134
|
+
</>
|
|
135
|
+
)}
|
|
136
|
+
</div>
|
|
137
|
+
))}
|
|
138
|
+
</NavigationContainer>
|
|
139
|
+
</div>
|
|
140
|
+
))}
|
|
141
|
+
|
|
142
|
+
<NavLink to={"/"} className="logout__link">
|
|
143
|
+
<LogoutIcon /> Logout
|
|
144
|
+
</NavLink>
|
|
145
|
+
</NavWrapper>
|
|
146
|
+
</SideMenuContainer>
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default AdminSideMenu;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { NavLink } from "react-router-dom";
|
|
3
|
+
|
|
4
|
+
export const SideMenuContainer = styled.div`
|
|
5
|
+
position: fixed;
|
|
6
|
+
width: 280px;
|
|
7
|
+
// max-height: 609px;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
background: #e6f9f9;
|
|
11
|
+
padding: 30px 25px;
|
|
12
|
+
transition: width 0.2s ease-in-out;
|
|
13
|
+
height: 100vh;
|
|
14
|
+
padding-right: 5px;
|
|
15
|
+
|
|
16
|
+
.logo_section {
|
|
17
|
+
width: 72px;
|
|
18
|
+
|
|
19
|
+
img {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.toggle {
|
|
25
|
+
width: 20px;
|
|
26
|
+
height: 20px;
|
|
27
|
+
display: flex;
|
|
28
|
+
border-radius: 4px;
|
|
29
|
+
background: #fff;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 115px;
|
|
34
|
+
right: -13px;
|
|
35
|
+
color: #fdcf04;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.active-dropdown {
|
|
39
|
+
background-color: #3ac2c2;
|
|
40
|
+
color: #fff;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.rc-collapse {
|
|
44
|
+
position: relative;
|
|
45
|
+
height: 0;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
transition: height 0.35s ease;
|
|
48
|
+
& .show {
|
|
49
|
+
height: auto;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.logout__link {
|
|
54
|
+
color: #f95454;
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
line-height: normal;
|
|
58
|
+
margin: 16px 0;
|
|
59
|
+
padding: 8px 15px;
|
|
60
|
+
display: flex;
|
|
61
|
+
column-gap: 10px;
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
export const NavWrapper = styled.div`
|
|
66
|
+
overflow-y: scroll;
|
|
67
|
+
padding-right: 20px;
|
|
68
|
+
|
|
69
|
+
&::-webkit-scrollbar {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
export const NavigationContainer = styled.div`
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
padding: 0 0 5px;
|
|
78
|
+
border-bottom: 1px solid #949999;
|
|
79
|
+
margin-bottom: 8px;
|
|
80
|
+
|
|
81
|
+
.menu_title {
|
|
82
|
+
color: #099;
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
line-height: normal;
|
|
86
|
+
margin: 18px 0 16px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
#navlink__title {
|
|
90
|
+
color: #636666;
|
|
91
|
+
font-size: 16px;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
line-height: normal;
|
|
94
|
+
margin-bottom: 16px;
|
|
95
|
+
padding: 8px 15px;
|
|
96
|
+
display: flex;
|
|
97
|
+
column-gap: 10px;
|
|
98
|
+
|
|
99
|
+
.dropdown_notification {
|
|
100
|
+
width: 22px;
|
|
101
|
+
height: 22px;
|
|
102
|
+
border-radius: 4px;
|
|
103
|
+
background-color: #f95454;
|
|
104
|
+
color: #fff;
|
|
105
|
+
font-family: "Satoshi", "Nunito";
|
|
106
|
+
font-size: 12px;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
margin-left: auto;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.active-link {
|
|
116
|
+
background-color: #3ac2c2;
|
|
117
|
+
color: #fff !important;
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
export const NavigationItemContainer = styled.p`
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
gap: 10px;
|
|
125
|
+
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
position: relative;
|
|
128
|
+
padding: ${({ minimal }) => (minimal ? "12px 16px" : "12px 12px")};
|
|
129
|
+
color: ${({ active }) =>
|
|
130
|
+
active
|
|
131
|
+
? "rgb(255, 255, 255) !important"
|
|
132
|
+
: "rgba(255, 255, 255, 0.625) !important"};
|
|
133
|
+
&:hover {
|
|
134
|
+
color: #ffffff !important;
|
|
135
|
+
background-color: #31cdcd;
|
|
136
|
+
|
|
137
|
+
> div {
|
|
138
|
+
opacity: 1;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
&.active {
|
|
142
|
+
background-color: rgba(0, 153, 153, 0.5);
|
|
143
|
+
// border-left: 5px solid #febf10;
|
|
144
|
+
border-radius: 10px 0 0px 10px;
|
|
145
|
+
color: #ffffff;
|
|
146
|
+
&::before {
|
|
147
|
+
content: "";
|
|
148
|
+
height: 110%;
|
|
149
|
+
width: 5px;
|
|
150
|
+
border-radius: 0 10px 10px 0;
|
|
151
|
+
position: absolute;
|
|
152
|
+
top: -5%;
|
|
153
|
+
left: 0;
|
|
154
|
+
display: block;
|
|
155
|
+
background: #febf10;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
|
|
160
|
+
export const IconContainer = styled.div`
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
font-size: 25px;
|
|
165
|
+
opacity: ${({ active }) => (active ? "1" : "0.625")};
|
|
166
|
+
`;
|
|
167
|
+
|
|
168
|
+
export const TextContainer = styled.div`
|
|
169
|
+
display: ${({ minimal }) => (minimal ? "flex" : "none")};
|
|
170
|
+
align-items: center;
|
|
171
|
+
font-size: 16px;
|
|
172
|
+
letter-spacing: 0.32px;
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
color: inherit;
|
|
175
|
+
`;
|
|
176
|
+
|
|
177
|
+
export const NotificationCount = styled.div`
|
|
178
|
+
background-color: #009999;
|
|
179
|
+
color: #fff;
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
border-radius: 50%;
|
|
186
|
+
width: 20px;
|
|
187
|
+
height: 20px;
|
|
188
|
+
margin-left: 2px;
|
|
189
|
+
|
|
190
|
+
${({ minimal }) =>
|
|
191
|
+
minimal
|
|
192
|
+
? null
|
|
193
|
+
: `
|
|
194
|
+
position: absolute;
|
|
195
|
+
bottom: 11px;
|
|
196
|
+
right: 14px;
|
|
197
|
+
width: 12px;
|
|
198
|
+
height: 12px;
|
|
199
|
+
font-size: 12px;
|
|
200
|
+
.text {
|
|
201
|
+
display: none;
|
|
202
|
+
}
|
|
203
|
+
`};
|
|
204
|
+
`;
|
|
205
|
+
|
|
206
|
+
export const LogoutButtonContainer = styled.div`
|
|
207
|
+
margin-top: auto;
|
|
208
|
+
display: flex;
|
|
209
|
+
gap: 10px;
|
|
210
|
+
cursor: pointer;
|
|
211
|
+
color: rgba(253, 253, 253, 0.595);
|
|
212
|
+
&:hover {
|
|
213
|
+
color: #ffffff;
|
|
214
|
+
}
|
|
215
|
+
`;
|
|
216
|
+
|
|
217
|
+
export const LogoutIcon = styled.img`
|
|
218
|
+
width: 20px;
|
|
219
|
+
height: 20px;
|
|
220
|
+
margin-right: 5px;
|
|
221
|
+
`;
|
|
222
|
+
|
|
223
|
+
export const LogoutText = styled.div`
|
|
224
|
+
font-weight: bold;
|
|
225
|
+
`;
|
|
226
|
+
|
|
227
|
+
export const SideMenuDropdownHeader = styled.div`
|
|
228
|
+
background-color: transparent;
|
|
229
|
+
padding: 8px 16px;
|
|
230
|
+
display: flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
column-gap: 10px;
|
|
233
|
+
color: #4a4d4d;
|
|
234
|
+
font-size: 16px;
|
|
235
|
+
font-weight: 600;
|
|
236
|
+
line-height: normal;
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
border-radius: 3px;
|
|
239
|
+
margin-bottom: 8px;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
|
|
242
|
+
.dropdown_header_txt {
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
column-gap: 10px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.dropdown_header_chevron {
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
}
|
|
252
|
+
`;
|
|
253
|
+
|
|
254
|
+
export const SideMenuDropdownBody = styled.div`
|
|
255
|
+
padding: 0 12px 0 48px;
|
|
256
|
+
|
|
257
|
+
.dropdown_row {
|
|
258
|
+
display: flex;
|
|
259
|
+
justify-content: space-between;
|
|
260
|
+
|
|
261
|
+
#dropdown__links {
|
|
262
|
+
&:last-child {
|
|
263
|
+
margin-bottom: 12px;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.dropdown_notification {
|
|
268
|
+
width: 22px;
|
|
269
|
+
height: 22px;
|
|
270
|
+
border-radius: 4px;
|
|
271
|
+
background-color: #f95454;
|
|
272
|
+
color: #fff;
|
|
273
|
+
font-family: "Satoshi", "Nunito";
|
|
274
|
+
font-size: 12px;
|
|
275
|
+
font-weight: 500;
|
|
276
|
+
display: flex;
|
|
277
|
+
align-items: center;
|
|
278
|
+
justify-content: center;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
#dropdown__links {
|
|
282
|
+
color: #4a4d4d;
|
|
283
|
+
font-size: 16px;
|
|
284
|
+
font-weight: 600;
|
|
285
|
+
line-height: normal;
|
|
286
|
+
margin: 2px 0 8px;
|
|
287
|
+
|
|
288
|
+
&.active {
|
|
289
|
+
color: #00c2c2;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
&:hover {
|
|
293
|
+
color: #00c2c2;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
@@ -10,11 +10,15 @@ import Loader from './loader';
|
|
|
10
10
|
* loaderAsset: object,
|
|
11
11
|
* isSectionLoader: boolean,
|
|
12
12
|
* hasBackground: boolean,
|
|
13
|
+
* fixed: boolean,
|
|
14
|
+
* loaderHeight: number,
|
|
15
|
+
* loaderWidth: number,
|
|
16
|
+
* zIndex: number,
|
|
13
17
|
* }} props - properties of the dropdown component
|
|
14
18
|
*/
|
|
15
19
|
|
|
16
20
|
const Backdrop = styled.div`
|
|
17
|
-
${({ isSectionLoader, hasBackground }) =>
|
|
21
|
+
${({ isSectionLoader, hasBackground, fixed, zIndex }) =>
|
|
18
22
|
isSectionLoader
|
|
19
23
|
? css`
|
|
20
24
|
position: relative;
|
|
@@ -23,19 +27,18 @@ const Backdrop = styled.div`
|
|
|
23
27
|
background: transparent;
|
|
24
28
|
`
|
|
25
29
|
: css`
|
|
26
|
-
position: fixed;
|
|
30
|
+
position: ${fixed ? 'fixed' : 'absolute'};
|
|
27
31
|
top: 0;
|
|
28
32
|
left: 0;
|
|
29
33
|
width: 100vw;
|
|
30
34
|
height: 100vh;
|
|
31
35
|
background: ${hasBackground ? 'rgba(110, 62, 62, 0.4)' : 'transparent'};
|
|
32
|
-
z-index:
|
|
36
|
+
z-index: ${zIndex};
|
|
33
37
|
`}
|
|
34
38
|
`;
|
|
35
39
|
|
|
36
|
-
|
|
37
40
|
const LoaderWrapper = styled.div`
|
|
38
|
-
${({ isSectionLoader }) =>
|
|
41
|
+
${({ isSectionLoader, fixed, zIndex }) =>
|
|
39
42
|
isSectionLoader
|
|
40
43
|
? css`
|
|
41
44
|
position: absolute;
|
|
@@ -45,11 +48,11 @@ const LoaderWrapper = styled.div`
|
|
|
45
48
|
z-index: 10;
|
|
46
49
|
`
|
|
47
50
|
: css`
|
|
48
|
-
position: fixed;
|
|
51
|
+
position: ${fixed ? 'fixed' : 'absolute'};
|
|
49
52
|
top: 50%;
|
|
50
53
|
left: 50%;
|
|
51
54
|
transform: translate(-50%, -50%);
|
|
52
|
-
z-index:
|
|
55
|
+
z-index: ${zIndex};
|
|
53
56
|
`}
|
|
54
57
|
img {
|
|
55
58
|
width: 300px;
|
|
@@ -57,12 +60,20 @@ const LoaderWrapper = styled.div`
|
|
|
57
60
|
}
|
|
58
61
|
`;
|
|
59
62
|
|
|
60
|
-
const FullPageLoader = ({
|
|
63
|
+
const FullPageLoader = ({
|
|
64
|
+
isSectionLoader = false,
|
|
65
|
+
hasBackground = false,
|
|
66
|
+
loaderAsset,
|
|
67
|
+
fixed,
|
|
68
|
+
loaderWidth = 400,
|
|
69
|
+
loaderHeight = 400,
|
|
70
|
+
zIndex = 999
|
|
71
|
+
}) => {
|
|
61
72
|
|
|
62
73
|
return (
|
|
63
|
-
<Backdrop isSectionLoader={isSectionLoader} hasBackground={hasBackground}>
|
|
64
|
-
<LoaderWrapper isSectionLoader={isSectionLoader}>
|
|
65
|
-
<Loader loaderAsset={loaderAsset} />
|
|
74
|
+
<Backdrop isSectionLoader={isSectionLoader} hasBackground={hasBackground} fixed={fixed} zIndex={zIndex}>
|
|
75
|
+
<LoaderWrapper isSectionLoader={isSectionLoader} fixed={fixed} zIndex={zIndex}>
|
|
76
|
+
<Loader loaderAsset={loaderAsset} width={loaderWidth} height={loaderHeight}/>
|
|
66
77
|
</LoaderWrapper>
|
|
67
78
|
</Backdrop>
|
|
68
79
|
);
|
|
@@ -8,11 +8,11 @@ const LoaderWrapper = styled.div`
|
|
|
8
8
|
display: flex;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
align-items: center;
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
11
|
+
width: ${({ width }) => width}px;
|
|
12
|
+
height: ${({ height }) => height}px;
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
|
-
const PageLoader = ({ loaderAsset = defaultLoaderAnimation }) => {
|
|
15
|
+
const PageLoader = ({ loaderAsset = defaultLoaderAnimation, width = 400, height = 400 }) => {
|
|
16
16
|
const animationContainer = useRef(null);
|
|
17
17
|
|
|
18
18
|
useEffect(() => {
|
|
@@ -28,7 +28,7 @@ const PageLoader = ({ loaderAsset = defaultLoaderAnimation }) => {
|
|
|
28
28
|
}, [loaderAsset]);
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
|
-
<LoaderWrapper ref={animationContainer} />
|
|
31
|
+
<LoaderWrapper ref={animationContainer} width={width} height={height} />
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
34
|
|
package/src/components/index.js
CHANGED
|
@@ -36,3 +36,4 @@ export { default as InstructorRightBar } from "./fileRightBar/instructorRightBar
|
|
|
36
36
|
|
|
37
37
|
export { default as EnterpriseRightBar } from "./fileRightBar/enterpriseRightBar";
|
|
38
38
|
export { default as FullPageLoader } from "./fullPageLoader"
|
|
39
|
+
export { default as AdminAppMainLayout } from "./AdminAppMainLayout"
|