hds-web 1.37.7 → 1.37.8
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/dist/index.css +1 -1
- package/dist/index.es.css +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/HDS/components/Headers/v3Header.js +48 -9
- package/src/styles/tailwind.css +4 -0
package/package.json
CHANGED
@@ -22,26 +22,43 @@ const updatePGParam = (originalLink, websiteKey) => {
|
|
22
22
|
|
23
23
|
export default function V3Header(props) {
|
24
24
|
const listSize = props.HEADER_LIST.length;
|
25
|
+
|
25
26
|
const [mobileNavOpen, setmobileNavOpen] = useState(false);
|
27
|
+
|
26
28
|
const [isProduct, setIsProduct] = useState(false);
|
29
|
+
|
27
30
|
const [isDeveloper, setIsDeveloper] = useState(false);
|
31
|
+
|
28
32
|
const [isCompany, setIsCompany] = useState(false);
|
33
|
+
|
29
34
|
const [currentTab, setCurrentTab] = useState("");
|
35
|
+
|
30
36
|
const [isShown, setIsShown] = useState(false);
|
37
|
+
|
31
38
|
const [isArrowActive, setIsArrowActive] = useState(false);
|
39
|
+
|
32
40
|
const signUpLink = props.signUpLink
|
33
41
|
? props.signUpLink
|
34
42
|
: "https://cloud.hasura.io/signup?pg=sample-apps&plcmt=header&cta=try-hasura&tech=default";
|
43
|
+
|
35
44
|
const logInLink = props.logInLink
|
36
45
|
? props.logInLink
|
37
46
|
: "https://cloud.hasura.io/login?pg=sample-apps&plcmt=header&cta=log-in&tech=default";
|
47
|
+
|
38
48
|
const signupURL = updatePGParam(signUpLink, props.website_key);
|
49
|
+
|
39
50
|
const loginURL = updatePGParam(logInLink, props.website_key);
|
51
|
+
|
40
52
|
const hideLoginButton = props.hideLoginButton;
|
53
|
+
|
54
|
+
// const isDarkMode = props?.isDarkMode;
|
55
|
+
const isDarkMode = props?.isDarkMode;
|
56
|
+
|
41
57
|
//testing
|
42
58
|
const [dropdownVisibility, setDropdownVisibility] = useState(
|
43
59
|
Array(props.HEADER_LIST.length).fill(false)
|
44
60
|
);
|
61
|
+
|
45
62
|
const handleDropdownEnter = (index) => {
|
46
63
|
setDropdownVisibility((prevVisibility) => {
|
47
64
|
const updatedVisibility = [...prevVisibility];
|
@@ -95,7 +112,11 @@ export default function V3Header(props) {
|
|
95
112
|
<div
|
96
113
|
className={classNames(
|
97
114
|
"group inline-flex items-center rounded-md bg-white hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",
|
98
|
-
dropdownVisibility[id]
|
115
|
+
dropdownVisibility[id]
|
116
|
+
? ""
|
117
|
+
: isDarkMode
|
118
|
+
? "text-neutral-0"
|
119
|
+
: "text-gray-500"
|
99
120
|
)}
|
100
121
|
>
|
101
122
|
<div className="flex flex-col items-center cursor-pointer">
|
@@ -150,7 +171,11 @@ export default function V3Header(props) {
|
|
150
171
|
{
|
151
172
|
<a href="/customers">
|
152
173
|
<Typography
|
153
|
-
className=
|
174
|
+
className={
|
175
|
+
isDarkMode
|
176
|
+
? "text-neutral-0 hover:text-blue-600 cursor-pointer"
|
177
|
+
: "hover:text-blue-600 cursor-pointer"
|
178
|
+
}
|
154
179
|
textStyle="body3c-medium"
|
155
180
|
>
|
156
181
|
{`Customers `}
|
@@ -162,7 +187,11 @@ export default function V3Header(props) {
|
|
162
187
|
{
|
163
188
|
<a href="/pricing">
|
164
189
|
<Typography
|
165
|
-
className=
|
190
|
+
className={
|
191
|
+
isDarkMode
|
192
|
+
? "text-neutral-0 hover:text-blue-600 cursor-pointer"
|
193
|
+
: "hover:text-blue-600 cursor-pointer"
|
194
|
+
}
|
166
195
|
textStyle="body3c-medium"
|
167
196
|
>
|
168
197
|
{`Pricing `}
|
@@ -278,6 +307,10 @@ export default function V3Header(props) {
|
|
278
307
|
|
279
308
|
// **************************** //
|
280
309
|
|
310
|
+
const logoUrl = isDarkMode
|
311
|
+
? `https://res.cloudinary.com/dh8fp23nd/image/upload/v1718878031/hasura_dark_mode_kjrlxi.svg`
|
312
|
+
: `https://res.cloudinary.com/dh8fp23nd/image/upload/v1686659126/website%20v3/hasura-primary_y9cdnn.svg`;
|
313
|
+
|
281
314
|
return (
|
282
315
|
<div className="relative mx-auto">
|
283
316
|
<div
|
@@ -288,10 +321,10 @@ export default function V3Header(props) {
|
|
288
321
|
<div className="flex flex-row justify-between items-center w-full tb-l:w-fit">
|
289
322
|
<div>
|
290
323
|
<a href={props.headerUrl} className={"flex items-center"}>
|
291
|
-
<
|
292
|
-
|
293
|
-
|
294
|
-
|
324
|
+
<img
|
325
|
+
className="min-w-[103px] w-[103px] h-[33px]"
|
326
|
+
src={logoUrl}
|
327
|
+
alt={props.brandAlt}
|
295
328
|
/>
|
296
329
|
</a>
|
297
330
|
</div>
|
@@ -330,11 +363,17 @@ export default function V3Header(props) {
|
|
330
363
|
{headerListfunction(props.HEADER_LIST)}
|
331
364
|
</nav>
|
332
365
|
<div className="hds-hidden tb-l:flex flex-row items-center gap-x-4 ">
|
333
|
-
{!props.hideSearch &&
|
366
|
+
{!props.hideSearch && (
|
367
|
+
<AlgoliaSearch isDarkMode={isDarkMode} {...props} />
|
368
|
+
)}
|
334
369
|
<a href="/contact-us" className="hds-hidden db:flex">
|
335
370
|
<Typography
|
336
371
|
textStyle="body3c-medium"
|
337
|
-
className=
|
372
|
+
className={
|
373
|
+
isDarkMode
|
374
|
+
? "text-neutral-0 hover:text-blue-600"
|
375
|
+
: "text-neutral-800 hover:text-blue-600"
|
376
|
+
}
|
338
377
|
>
|
339
378
|
Contact Us
|
340
379
|
</Typography>
|