l-min-components 0.2.0

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.
Files changed (137) hide show
  1. package/package.json +38 -0
  2. package/src/assets/Icon.svg +3 -0
  3. package/src/assets/friendrequest.png +0 -0
  4. package/src/assets/images/User-avatar.svg.png +0 -0
  5. package/src/assets/images/Vector19.png +0 -0
  6. package/src/assets/images/android.png +0 -0
  7. package/src/assets/images/avatar.png +0 -0
  8. package/src/assets/images/banner.png +0 -0
  9. package/src/assets/images/dashboardImage.png +0 -0
  10. package/src/assets/images/figma.png +0 -0
  11. package/src/assets/images/linkedin.png +0 -0
  12. package/src/assets/images/logo.png +0 -0
  13. package/src/assets/images/onboarding.png +0 -0
  14. package/src/assets/images/sign_up.png +0 -0
  15. package/src/assets/react.svg +1 -0
  16. package/src/assets/svg/Frame 4534413.svg +7 -0
  17. package/src/assets/svg/Property 44.svg +5 -0
  18. package/src/assets/svg/Property 55.svg +10 -0
  19. package/src/assets/svg/add.jsx +14 -0
  20. package/src/assets/svg/arrow-down.jsx +14 -0
  21. package/src/assets/svg/arrow-right.svg +4 -0
  22. package/src/assets/svg/book.jsx +34 -0
  23. package/src/assets/svg/calendar.jsx +64 -0
  24. package/src/assets/svg/close.jsx +15 -0
  25. package/src/assets/svg/coolicon.svg +3 -0
  26. package/src/assets/svg/download.jsx +32 -0
  27. package/src/assets/svg/eos-icons_machine-learning-outlined.svg +6 -0
  28. package/src/assets/svg/learning.jsx +21 -0
  29. package/src/assets/svg/logout.svg +5 -0
  30. package/src/assets/svg/material-symbols_spatial-audio-outline-rounded.svg +3 -0
  31. package/src/assets/svg/message.jsx +39 -0
  32. package/src/assets/svg/notification.jsx +32 -0
  33. package/src/assets/svg/people.jsx +17 -0
  34. package/src/assets/svg/search.jsx +24 -0
  35. package/src/assets/svg/setting.jsx +14 -0
  36. package/src/components/ApiProgress/ApiConsumption/assets/Vector.jsx +8 -0
  37. package/src/components/ApiProgress/ApiConsumption/index.jsx +60 -0
  38. package/src/components/ApiProgress/ApiConsumption/styles/index.jsx +61 -0
  39. package/src/components/ApiProgress/ApiProgressBar/index.jsx +99 -0
  40. package/src/components/ApiProgress/ApiProgressBar/styles/index.jsx +122 -0
  41. package/src/components/ApiProgress/toggle/index.jsx +34 -0
  42. package/src/components/ApiProgress/toggle/styles/index.jsx +72 -0
  43. package/src/components/AppMainLayout/index.jsx +50 -0
  44. package/src/components/AppMainLayout/index.styled.js +37 -0
  45. package/src/components/Arrow.jsx +24 -0
  46. package/src/components/apiBar/bar.jsx +46 -0
  47. package/src/components/apiBar/index.jsx +55 -0
  48. package/src/components/authentication/assets/images/sign_up.png +0 -0
  49. package/src/components/authentication/index.styled.js +32 -0
  50. package/src/components/authentication/mainLayout.jsx +14 -0
  51. package/src/components/banner/assets/Vector19.png +0 -0
  52. package/src/components/banner/assets/banner.png +0 -0
  53. package/src/components/banner/index.jsx +41 -0
  54. package/src/components/banner/styles/index.jsx +81 -0
  55. package/src/components/bar/styles.css +19 -0
  56. package/src/components/button/index.jsx +329 -0
  57. package/src/components/button/socialBtn.jsx +38 -0
  58. package/src/components/calender/input.jsx +202 -0
  59. package/src/components/calender/styles/input.jsx +127 -0
  60. package/src/components/checkBoxes/checkbox/doc.md +36 -0
  61. package/src/components/checkBoxes/checkbox/index.jsx +53 -0
  62. package/src/components/checkBoxes/checkbox/styles/index.jsx +64 -0
  63. package/src/components/checkBoxes/checkboxGroup/doc.md +55 -0
  64. package/src/components/checkBoxes/checkboxGroup/index.jsx +47 -0
  65. package/src/components/checkBoxes/checkboxGroup/styles/index.jsx +7 -0
  66. package/src/components/course/courseList/index.jsx +32 -0
  67. package/src/components/course/courseList/styles/index.jsx +10 -0
  68. package/src/components/course/coursecard/index.jsx +56 -0
  69. package/src/components/course/coursecard/styles/index.jsx +70 -0
  70. package/src/components/developerAPIdocs/assets/icons.jsx +46 -0
  71. package/src/components/developerAPIdocs/assets/learngual_developer_api_doc.png +0 -0
  72. package/src/components/developerAPIdocs/index.jsx +154 -0
  73. package/src/components/developerAPIdocs/index.styled.js +137 -0
  74. package/src/components/dropdown component/index.jsx +139 -0
  75. package/src/components/dropdown component/styles.js +82 -0
  76. package/src/components/friendRequest/friendRequestCard/doc.md +49 -0
  77. package/src/components/friendRequest/friendRequestCard/index.jsx +82 -0
  78. package/src/components/friendRequest/friendRequestCard/styles/index.jsx +109 -0
  79. package/src/components/friendRequest/friendRequestList/doc.md +61 -0
  80. package/src/components/friendRequest/friendRequestList/index.jsx +58 -0
  81. package/src/components/friendRequest/friendRequestList/styles/index.jsx +34 -0
  82. package/src/components/graph/graphData.jsx +119 -0
  83. package/src/components/graph/index.jsx +111 -0
  84. package/src/components/graph/index.styled.js +261 -0
  85. package/src/components/header/account-dropdown.jsx +86 -0
  86. package/src/components/header/assets/images/User-avatar.svg.png +0 -0
  87. package/src/components/header/assets/images/android.png +0 -0
  88. package/src/components/header/assets/images/avatar.png +0 -0
  89. package/src/components/header/assets/images/figma.png +0 -0
  90. package/src/components/header/assets/images/linkedin.png +0 -0
  91. package/src/components/header/assets/images/logo.png +0 -0
  92. package/src/components/header/assets/images/sign_up.png +0 -0
  93. package/src/components/header/assets/svg/add.jsx +14 -0
  94. package/src/components/header/assets/svg/arrow-down.jsx +14 -0
  95. package/src/components/header/assets/svg/book.jsx +34 -0
  96. package/src/components/header/assets/svg/close.jsx +15 -0
  97. package/src/components/header/assets/svg/coolicon.svg +3 -0
  98. package/src/components/header/assets/svg/message.jsx +39 -0
  99. package/src/components/header/assets/svg/notification.jsx +32 -0
  100. package/src/components/header/assets/svg/people.jsx +17 -0
  101. package/src/components/header/assets/svg/search.jsx +24 -0
  102. package/src/components/header/assets/svg/setting.jsx +14 -0
  103. package/src/components/header/index.jsx +134 -0
  104. package/src/components/header/index.styled.js +486 -0
  105. package/src/components/header/login-header.jsx +71 -0
  106. package/src/components/input/index.jsx +68 -0
  107. package/src/components/input/index.styled.js +45 -0
  108. package/src/components/loader/index.jsx +70 -0
  109. package/src/components/notificationProgressBar/index.jsx +187 -0
  110. package/src/components/notificationProgressBar/styles/index.jsx +122 -0
  111. package/src/components/notificationThreshold/index.jsx +111 -0
  112. package/src/components/notificationThreshold/index.styled.js +129 -0
  113. package/src/components/notificationThreshold/slider.jsx +46 -0
  114. package/src/components/progressBar/index.jsx +32 -0
  115. package/src/components/progressBar/styles/index.jsx +44 -0
  116. package/src/components/radio/doc.md +41 -0
  117. package/src/components/radio/index.jsx +70 -0
  118. package/src/components/radio/styles/index.jsx +56 -0
  119. package/src/components/searchBar/doc.md +68 -0
  120. package/src/components/searchBar/index.jsx +108 -0
  121. package/src/components/searchBar/styles/index.jsx +89 -0
  122. package/src/components/select/doc.md +0 -0
  123. package/src/components/select/index.jsx +122 -0
  124. package/src/components/select/styles/index.jsx +98 -0
  125. package/src/components/sideBar/sideMenu/index.jsx +95 -0
  126. package/src/components/sideBar/sideMenu/styles/index.jsx +135 -0
  127. package/src/components/sideBar/userCard/index.jsx +32 -0
  128. package/src/components/sideBar/userCard/styles/index.jsx +37 -0
  129. package/src/components/sideNav/index.jsx +28 -0
  130. package/src/components/sideNav/styles/index.jsx +159 -0
  131. package/src/components/subscriptionPreview/index.jsx +55 -0
  132. package/src/components/subscriptionPreview/style/style.js +85 -0
  133. package/src/components/successCard/assets/PartyingFace.png +0 -0
  134. package/src/components/successCard/index.jsx +29 -0
  135. package/src/components/successCard/index.styled.js +33 -0
  136. package/src/components/toggle button/index.jsx +43 -0
  137. package/src/components/toggle button/styles.js +26 -0
@@ -0,0 +1,134 @@
1
+ import { useState, useEffect, useRef } from "react";
2
+ import ReactFlagsSelect from "react-flags-select";
3
+ import logo from "./assets/images/logo.png";
4
+ import { BookIcon } from "./assets/svg/book";
5
+ import { PeopleIcon } from "./assets/svg/people";
6
+ import { MessageIcon } from "./assets/svg/message";
7
+ import { SettingIcon } from "./assets/svg/setting";
8
+ import { SearchIcon } from "./assets/svg/search";
9
+ import { NotificationIcon } from "./assets/svg/notification";
10
+ import { ArrowDownIcon } from "./assets/svg/arrow-down";
11
+ import AccountDropdown from "./account-dropdown";
12
+ import avatar from "./assets/images/avatar.png";
13
+ import {
14
+ Navbar,
15
+ NavGroup,
16
+ Nav,
17
+ SearchInputGroup,
18
+ SearchInput,
19
+ UserProfile,
20
+ CountryFlagGroup,
21
+ } from "./index.styled";
22
+
23
+ /**
24
+ * @param {{
25
+ * type: string,
26
+ * text: string,
27
+ * onClick: Function,
28
+ * style: CSSProperties,
29
+ * }} props - properties of Header Component
30
+ *
31
+ */
32
+ const HeaderComponent = (props) => {
33
+ const [selected, setSelected] = useState("ES");
34
+ const [isOpen, setIsOpen] = useState(false);
35
+ const [searchResultOpen, setSearchResultOpen] = useState(false);
36
+
37
+ console.log(selected);
38
+
39
+ useEffect(() => {
40
+ setIsOpen(false);
41
+ }, []);
42
+
43
+ return (
44
+ <Navbar>
45
+ <img src={logo} alt="Learngual logo" />
46
+ <Nav>
47
+ <li>
48
+ <a href="#" className="active">
49
+ <BookIcon /> Learning
50
+ </a>
51
+ </li>
52
+ <li>
53
+ <a href="#">
54
+ <PeopleIcon /> Friends
55
+ </a>
56
+ </li>
57
+ <li>
58
+ <a href="#">
59
+ <MessageIcon /> Messages
60
+ </a>
61
+ </li>
62
+ <li>
63
+ <a href="#">
64
+ <SettingIcon /> Settings
65
+ </a>
66
+ </li>
67
+ <li>
68
+ <a href="#">
69
+ <NotificationIcon /> Notifications
70
+ </a>
71
+ </li>
72
+ </Nav>
73
+
74
+ <NavGroup>
75
+ <SearchInputGroup>
76
+ <SearchIcon />
77
+ <SearchInput
78
+ type={props.inputType}
79
+ value={props.value}
80
+ id={props.inputId}
81
+ placeholder={props.placeholder}
82
+ style={props.inputStyles}
83
+ onChange={props.onChange}
84
+ onFocus={() => setSearchResultOpen(true)}
85
+ onBlur={() => setSearchResultOpen(false)}
86
+ />
87
+
88
+ {searchResultOpen && (
89
+ <div className="search-result-wrapper">
90
+ <p>
91
+ Website <span>UIUX </span> Design
92
+ </p>
93
+ </div>
94
+ )}
95
+ </SearchInputGroup>
96
+
97
+ <CountryFlagGroup>
98
+ <ReactFlagsSelect
99
+ selected={selected}
100
+ onSelect={(code) => setSelected(code)}
101
+ showOptionLabel={true}
102
+ />
103
+ <ArrowDownIcon />
104
+ </CountryFlagGroup>
105
+
106
+ <UserProfile onClick={() => setIsOpen(true)}>
107
+ <div className="user-img-container">
108
+ <img src={props.avatar} alt="profile" />
109
+ </div>
110
+ <div className="user-info-container">
111
+ <h5>{props.accounts}</h5>
112
+ <h6>{props.accountType}</h6>
113
+ </div>
114
+ <ArrowDownIcon width={16} height={10} />
115
+ </UserProfile>
116
+ </NavGroup>
117
+
118
+ {isOpen && (
119
+ <AccountDropdown
120
+ avatar={avatar}
121
+ activeAccountName={"Michael Ohaga"}
122
+ activeAccountType={"Personal Account"}
123
+ accountName={"Jo Gulgowski"}
124
+ accountType={"Instructor Account"}
125
+ notificationCount={"5"}
126
+ isOpen={isOpen}
127
+ setIsOpen={setIsOpen}
128
+ />
129
+ )}
130
+ </Navbar>
131
+ );
132
+ };
133
+
134
+ export default HeaderComponent;
@@ -0,0 +1,486 @@
1
+ import styled from "styled-components";
2
+
3
+ /* styles for header component authenticated users */
4
+ export const Navbar = styled.nav`
5
+ background-color: rgba(255, 255, 255, 1);
6
+ padding: 10px 10px 10px 20px;
7
+ display: flex;
8
+ font-family: "Nunito";
9
+ width: 100%;
10
+ align-items: center;
11
+ position: fixed;
12
+ z-index: 555;
13
+ `;
14
+
15
+ export const NavGroup = styled.div`
16
+ width: 40%;
17
+ display: flex;
18
+ justify-content: end;
19
+ `;
20
+
21
+ export const Nav = styled.ul`
22
+ display: flex;
23
+ list-style: none;
24
+ align-items: center;
25
+ margin: 0 10px;
26
+ padding: 0 5px;
27
+ width: 57%;
28
+ & li {
29
+ display: flex;
30
+ align-items: center;
31
+ margin: 0 10px;
32
+ }
33
+
34
+ & li:nth-of-type(1) {
35
+ margin-right: 75px;
36
+ margin-left: 35px;
37
+ }
38
+
39
+ & a.active {
40
+ color: rgba(0, 194, 194, 1) !important;
41
+ font-size: 21px;
42
+ font-weight: 600;
43
+ & svg path {
44
+ stroke: rgba(0, 194, 194, 1);
45
+ }
46
+ }
47
+
48
+ & a {
49
+ text-decoration: none;
50
+ display: flex;
51
+ align-items: center;
52
+ font-size: 16px;
53
+ color: rgba(74, 77, 77, 1);
54
+
55
+ & svg {
56
+ margin-right: 12px;
57
+ }
58
+
59
+ &:hover {
60
+ color: rgba(0, 2, 2, 1);
61
+ & svg path {
62
+ stroke: rgba(0, 194, 194, 1);
63
+ }
64
+ }
65
+ }
66
+ `;
67
+
68
+ export const SearchInputGroup = styled.div`
69
+ background-color: transparent;
70
+ border-radius: 60px;
71
+ border: 1px solid rgba(173, 178, 178, 1);
72
+ transition: 0.5s;
73
+ display: flex;
74
+ align-items: center;
75
+ padding: 9px;
76
+ margin: 0 15px;
77
+ position: relative;
78
+ &:focus {
79
+ width: 130px;
80
+ }
81
+ &:active {
82
+ border: 1px solid rgba(0, 2, 2, 1);
83
+ }
84
+ &::placeholder {
85
+ color: rgba(173, 178, 178, 1);
86
+ }
87
+
88
+ & .search-result-wrapper {
89
+ position: absolute;
90
+ width: 300px;
91
+ height: 221px;
92
+ background-color: #ffffff;
93
+ box-shadow: 0px 2px 40px rgba(0, 0, 0, 0.08);
94
+ border-radius: 29px;
95
+ top: 56px;
96
+ right: -23px;
97
+ padding: 25px;
98
+
99
+ & p {
100
+ font-size: 16px;
101
+ line-height: 22px;
102
+ font-family: "Nunito";
103
+ color: #000000;
104
+ margin-bottom: 16px;
105
+
106
+ &:last-child {
107
+ margin-bottom: 0;
108
+ }
109
+
110
+ & span {
111
+ font-weight: 700;
112
+ }
113
+ }
114
+ }
115
+ `;
116
+
117
+ export const SearchInput = styled.input`
118
+ background-color: transparent;
119
+ padding: 0 8px;
120
+ font-size: 16px;
121
+ font-weight: 400;
122
+ border: none;
123
+ color: rgba(173, 179, 179, 1);
124
+ transition: 0.5s;
125
+ outline: none;
126
+ &:active {
127
+ border: none;
128
+ }
129
+ &::placeholder {
130
+ color: rgba(173, 178, 178, 1);
131
+ }
132
+ `;
133
+
134
+ export const UserProfile = styled.div`
135
+ display: flex;
136
+ align-items: center;
137
+ cursor: pointer;
138
+
139
+ & h5 {
140
+ margin: 0;
141
+ color: rgba(49, 51, 51, 1);
142
+ font-size: 16px;
143
+ font-weight: 700;
144
+ }
145
+
146
+ & h6 {
147
+ color: rgba(148, 153, 153, 1);
148
+ margin: 0;
149
+ font-size: 12px;
150
+ font-weight: 600;
151
+ }
152
+
153
+ & > div {
154
+ margin-left: 10px;
155
+ }
156
+
157
+ & svg {
158
+ margin-left: 20px;
159
+ }
160
+ `;
161
+
162
+ export const CountryFlagGroup = styled.div`
163
+ background-color: transparent;
164
+ border-radius: 60px;
165
+ transition: 0.5s;
166
+ display: flex;
167
+ align-items: center;
168
+ position: relative;
169
+ width: 70px;
170
+ margin: 0 10px;
171
+
172
+ & > svg {
173
+ position: absolute;
174
+ right: 7px;
175
+ width: 16px;
176
+ height: 10px;
177
+ top: 18px;
178
+ }
179
+
180
+ & .ReactFlagsSelect-module_flagsSelect__2pfa2 {
181
+ width: 100%;
182
+ padding-bottom: 0;
183
+ }
184
+
185
+ & .ReactFlagsSelect-module_selectBtn__19wW7 {
186
+ border: 1px solid rgba(173, 178, 178, 1);
187
+ border-radius: 20px;
188
+ padding: 5px 10px 5px 0;
189
+ }
190
+
191
+ & .ReactFlagsSelect-module_selectBtn__19wW7:after {
192
+ display: none;
193
+ }
194
+
195
+ &
196
+ .ReactFlagsSelect-module_selectValue__152eS
197
+ .ReactFlagsSelect-module_label__27pw9 {
198
+ display: none;
199
+ }
200
+
201
+ /* & .ReactFlagsSelect-module_label__27pw9,
202
+ .ReactFlagsSelect-module_secondaryLabel__37t1D {
203
+ display: none !important;
204
+ } */
205
+
206
+ & .ReactFlagsSelect-module_selectFlag__2q5gC {
207
+ svg {
208
+ border-radius: 50%;
209
+ width: 26px;
210
+ }
211
+ }
212
+ `;
213
+
214
+ /* styles for header account dropdown */
215
+
216
+ export const AccountDropdownLayout = styled.div`
217
+ background-color: #ffffff;
218
+ font-family: "Nunito";
219
+ width: 286px;
220
+ min-height: 300px;
221
+ box-shadow: 0px 2px 40px rgba(0, 0, 0, 0.08);
222
+ border-radius: 30px;
223
+ display: flex;
224
+ flex-direction: column;
225
+ position: absolute;
226
+ top: 65px;
227
+ right: 0;
228
+ z-index: 5;
229
+ `;
230
+
231
+ export const AccountDropdownHeader = styled.div`
232
+ padding: 24px;
233
+ display: flex;
234
+ font-family: "Nunito";
235
+ align-items: center;
236
+ border-radius: 30px 30px 0 0;
237
+ width: 100%;
238
+ border-bottom: 1px solid rgba(51, 51, 51, 0.15);
239
+
240
+ & h1 {
241
+ font-family: "Poppins";
242
+ font-weight: 600;
243
+ font-size: 16px;
244
+ color: rgba(51, 51, 51, 1);
245
+ margin-left: 16px;
246
+ }
247
+
248
+ & h2 {
249
+ font-family: "Poppins";
250
+ font-weight: 400;
251
+ font-size: 14px;
252
+ color: rgba(51, 51, 51, 0.7);
253
+ margin-left: 16px;
254
+ }
255
+
256
+ & svg {
257
+ margin-left: auto;
258
+ }
259
+ `;
260
+
261
+ export const AccountDropdownBody = styled.div`
262
+ background-color: #ffffff;
263
+ width: 100%;
264
+
265
+ & h3 {
266
+ font-family: "Nunito";
267
+ font-style: normal;
268
+ font-weight: 400;
269
+ font-size: 14px;
270
+ color: rgba(74, 77, 77, 1);
271
+ padding: 4px 10px 0;
272
+ }
273
+
274
+ & h1 {
275
+ font-family: "Nunito";
276
+ font-style: normal;
277
+ font-weight: 400;
278
+ font-size: 14px;
279
+ line-height: 19px;
280
+ color: #000000;
281
+
282
+ &:hover {
283
+ color: rgba(0, 194, 194, 1);
284
+ }
285
+ }
286
+
287
+ & img {
288
+ width: 100%;
289
+ height: 100%;
290
+ }
291
+
292
+ & .avatar-container {
293
+ width: 30px;
294
+ height: 30px;
295
+ }
296
+
297
+ & .account-info {
298
+ display: flex;
299
+ align-items: center;
300
+ cursor: pointer;
301
+ padding: 10px 20px;
302
+ &:hover {
303
+ background-color: rgba(239, 248, 248, 1);
304
+
305
+ h1 {
306
+ color: rgba(0, 194, 194, 1);
307
+ }
308
+ }
309
+ }
310
+
311
+ & .account-details {
312
+ margin-left: 10px;
313
+ display: flex;
314
+ justify-content: space-between;
315
+ width: 80%;
316
+
317
+ & span {
318
+ width: 20px;
319
+ height: 20px;
320
+ background-color: rgba(176, 220, 220, 0.2);
321
+ display: flex;
322
+ justify-content: center;
323
+ align-items: center;
324
+ border-radius: 50%;
325
+ color: rgba(0, 194, 194, 1);
326
+ font-size: 12px;
327
+ font-weight: 700;
328
+ }
329
+ }
330
+ `;
331
+
332
+ export const AccountDropdownFooter = styled.div`
333
+ background-color: #ffffff;
334
+ padding: 17px 26px;
335
+ display: flex;
336
+ font-family: "Nunito";
337
+ width: 100%;
338
+ align-items: center;
339
+ border-radius: 0 0 30px 30px;
340
+ display: flex;
341
+ justify-content: center;
342
+ border-top: 1px solid rgba(51, 51, 51, 0.15);
343
+ margin-top: auto;
344
+
345
+ & button {
346
+ display: flex;
347
+ border: none;
348
+ font-family: "Nunito";
349
+ font-weight: 700;
350
+ font-size: 16px;
351
+ line-height: 22px;
352
+ align-items: center;
353
+ text-align: center;
354
+ color: rgba(254, 191, 16, 1);
355
+ background-color: transparent;
356
+ cursor: pointer;
357
+
358
+ & svg {
359
+ margin-right: 17px;
360
+ }
361
+ }
362
+ `;
363
+
364
+ /* styles for header component unauthenticated users*/
365
+ export const Navbar2 = styled.nav`
366
+ background-color: #ffffff;
367
+ padding: 24px 100px;
368
+ display: flex;
369
+ font-family: "Nunito";
370
+ width: 100%;
371
+ align-items: center;
372
+ position: fixed;
373
+ `;
374
+
375
+ export const Nav2 = styled.ul`
376
+ display: flex;
377
+ list-style: none;
378
+ align-items: center;
379
+ margin: 0 50px;
380
+ padding: 0 5px;
381
+ width: 57%;
382
+ z-index: 555;
383
+ & li {
384
+ display: flex;
385
+ align-items: center;
386
+ margin: 0 20px;
387
+
388
+ display: flex;
389
+ flex-direction: column;
390
+ justify-content: space-around;
391
+ align-items: center;
392
+
393
+ /* &:hover {
394
+ border-bottom: 2px solid red;
395
+ } */
396
+ }
397
+
398
+ & a.active {
399
+ color: rgba(74, 77, 77, 1);
400
+ font-weight: 700;
401
+ }
402
+
403
+ & a {
404
+ text-decoration: none;
405
+ display: flex;
406
+ align-items: center;
407
+ font-size: 16px;
408
+ color: rgba(148, 153, 153, 1);
409
+ font-weight: 700;
410
+
411
+ &:hover {
412
+ color: rgba(74, 77, 77, 1);
413
+ }
414
+ }
415
+
416
+ & a:after {
417
+ display: block;
418
+ content: "";
419
+ border-bottom: solid 5px #000;
420
+ transform: scaleX(1);
421
+ transition: transform 300ms ease-in-out;
422
+ }
423
+
424
+ & a:hover:after {
425
+ transform: scaleX(1);
426
+ }
427
+ `;
428
+
429
+ export const NavGroup2 = styled.div`
430
+ width: 50%;
431
+ display: flex;
432
+ justify-content: end;
433
+ `;
434
+
435
+ export const CountryFlagGroup2 = styled.div`
436
+ /* background-color: rgba(249, 84, 84, 1); */
437
+ border-radius: 8px;
438
+ transition: 0.5s;
439
+ display: flex;
440
+ align-items: center;
441
+ position: relative;
442
+ width: 70px;
443
+ margin: 0 70px 0 0;
444
+
445
+ & > svg {
446
+ position: absolute;
447
+ right: 10px;
448
+ width: 12px;
449
+ height: 7px;
450
+ top: 17px;
451
+ }
452
+
453
+ & .ReactFlagsSelect-module_flagsSelect__2pfa2 {
454
+ width: 100%;
455
+ padding-bottom: 0;
456
+ }
457
+
458
+ & .ReactFlagsSelect-module_selectBtn__19wW7 {
459
+ border: none;
460
+ border-radius: 10px;
461
+ padding: 3px 8px 3px 0;
462
+ background-color: rgba(249, 84, 84, 0.1);
463
+ }
464
+
465
+ & .ReactFlagsSelect-module_selectBtn__19wW7:after {
466
+ display: none;
467
+ }
468
+
469
+ &
470
+ .ReactFlagsSelect-module_selectValue__152eS
471
+ .ReactFlagsSelect-module_label__27pw9 {
472
+ display: none;
473
+ }
474
+
475
+ /* & .ReactFlagsSelect-module_label__27pw9,
476
+ .ReactFlagsSelect-module_secondaryLabel__37t1D {
477
+ display: none !important;
478
+ } */
479
+
480
+ & .ReactFlagsSelect-module_selectFlag__2q5gC {
481
+ svg {
482
+ border-radius: 50%;
483
+ width: 26px;
484
+ }
485
+ }
486
+ `;
@@ -0,0 +1,71 @@
1
+ import { useState, useEffect, useRef } from "react";
2
+ import ReactFlagsSelect from "react-flags-select";
3
+ import logo from "./assets/images/logo.png";
4
+ import {
5
+ Navbar2,
6
+ NavGroup2,
7
+ Nav2,
8
+ CountryFlagGroup2,
9
+ } from "./index.styled";
10
+ import { ArrowDownIcon } from "./assets/svg/arrow-down";
11
+ import ButtonComponent from "../button";
12
+
13
+
14
+ /**
15
+ * @param {{
16
+ * type: string,
17
+ * text: string,
18
+ * onClick: Function,
19
+ * style: CSSProperties,
20
+ * }} props - properties of Header Component
21
+ *
22
+ */
23
+ const HeaderComponentTwo = (props) => {
24
+ const [selected, setSelected] = useState("ES");
25
+ const [isOpen, setIsOpen] = useState(false);
26
+ const [searchResultOpen, setSearchResultOpen] = useState(false);
27
+
28
+ console.log(selected);
29
+
30
+ useEffect(() => {
31
+ setIsOpen(false);
32
+ }, []);
33
+
34
+ return (
35
+ <Navbar2>
36
+ <img src={logo} alt="Learngual logo" />
37
+ <Nav2>
38
+ <li>
39
+ <a href="#" className="active">
40
+ What we do
41
+ </a>
42
+ </li>
43
+ <li>
44
+ <a href="#">Demo</a>
45
+ </li>
46
+ <li>
47
+ <a href="#">Pricing</a>
48
+ </li>
49
+ <li>
50
+ <a href="#">Contact</a>
51
+ </li>
52
+ </Nav2>
53
+
54
+ <NavGroup2>
55
+ <CountryFlagGroup2>
56
+ <ReactFlagsSelect
57
+ selected={selected}
58
+ onSelect={(code) => setSelected(code)}
59
+ showOptionLabel={false}
60
+ />
61
+ <ArrowDownIcon />
62
+ </CountryFlagGroup2>
63
+
64
+ <ButtonComponent type="secondary" text="Log in"/>
65
+ </NavGroup2>
66
+ </Navbar2>
67
+
68
+ );
69
+ };
70
+
71
+ export default HeaderComponentTwo;