hds-web 1.37.7 → 1.37.9
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
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 = true;
|
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,12 +112,20 @@ 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">
|
102
123
|
<Typography
|
103
|
-
className=
|
124
|
+
className={
|
125
|
+
isDarkMode
|
126
|
+
? "text-neutral-0 hover:text-blue-600"
|
127
|
+
: "hover:text-blue-600"
|
128
|
+
}
|
104
129
|
textStyle="body3c-medium"
|
105
130
|
>
|
106
131
|
{`${title} `}
|
@@ -150,7 +175,11 @@ export default function V3Header(props) {
|
|
150
175
|
{
|
151
176
|
<a href="/customers">
|
152
177
|
<Typography
|
153
|
-
className=
|
178
|
+
className={
|
179
|
+
isDarkMode
|
180
|
+
? "text-neutral-0 hover:text-blue-600 cursor-pointer"
|
181
|
+
: "hover:text-blue-600 cursor-pointer"
|
182
|
+
}
|
154
183
|
textStyle="body3c-medium"
|
155
184
|
>
|
156
185
|
{`Customers `}
|
@@ -162,7 +191,11 @@ export default function V3Header(props) {
|
|
162
191
|
{
|
163
192
|
<a href="/pricing">
|
164
193
|
<Typography
|
165
|
-
className=
|
194
|
+
className={
|
195
|
+
isDarkMode
|
196
|
+
? "text-neutral-0 hover:text-blue-600 cursor-pointer"
|
197
|
+
: "hover:text-blue-600 cursor-pointer"
|
198
|
+
}
|
166
199
|
textStyle="body3c-medium"
|
167
200
|
>
|
168
201
|
{`Pricing `}
|
@@ -278,6 +311,10 @@ export default function V3Header(props) {
|
|
278
311
|
|
279
312
|
// **************************** //
|
280
313
|
|
314
|
+
const logoUrl = isDarkMode
|
315
|
+
? `https://res.cloudinary.com/dh8fp23nd/image/upload/v1718878031/hasura_dark_mode_kjrlxi.svg`
|
316
|
+
: `https://res.cloudinary.com/dh8fp23nd/image/upload/v1686659126/website%20v3/hasura-primary_y9cdnn.svg`;
|
317
|
+
|
281
318
|
return (
|
282
319
|
<div className="relative mx-auto">
|
283
320
|
<div
|
@@ -288,10 +325,10 @@ export default function V3Header(props) {
|
|
288
325
|
<div className="flex flex-row justify-between items-center w-full tb-l:w-fit">
|
289
326
|
<div>
|
290
327
|
<a href={props.headerUrl} className={"flex items-center"}>
|
291
|
-
<
|
292
|
-
|
293
|
-
|
294
|
-
|
328
|
+
<img
|
329
|
+
className="min-w-[103px] w-[103px] h-[33px]"
|
330
|
+
src={logoUrl}
|
331
|
+
alt={props.brandAlt}
|
295
332
|
/>
|
296
333
|
</a>
|
297
334
|
</div>
|
@@ -330,11 +367,17 @@ export default function V3Header(props) {
|
|
330
367
|
{headerListfunction(props.HEADER_LIST)}
|
331
368
|
</nav>
|
332
369
|
<div className="hds-hidden tb-l:flex flex-row items-center gap-x-4 ">
|
333
|
-
{!props.hideSearch &&
|
370
|
+
{!props.hideSearch && (
|
371
|
+
<AlgoliaSearch isDarkMode={isDarkMode} {...props} />
|
372
|
+
)}
|
334
373
|
<a href="/contact-us" className="hds-hidden db:flex">
|
335
374
|
<Typography
|
336
375
|
textStyle="body3c-medium"
|
337
|
-
className=
|
376
|
+
className={
|
377
|
+
isDarkMode
|
378
|
+
? "text-neutral-0 hover:text-blue-600"
|
379
|
+
: "text-neutral-800 hover:text-blue-600"
|
380
|
+
}
|
338
381
|
>
|
339
382
|
Contact Us
|
340
383
|
</Typography>
|
@@ -35,11 +35,15 @@ export default function Search(props) {
|
|
35
35
|
setShowSearch((preShowSearch) => !preShowSearch);
|
36
36
|
}}
|
37
37
|
>
|
38
|
-
<p className="-mt-1"
|
38
|
+
<p className={props?.isDarkMode ? "-mt-1 text-neutral-0" : "-mt-1"}>
|
39
|
+
/{" "}
|
40
|
+
</p>
|
39
41
|
<Icon
|
40
42
|
height={"h-4 w-4 stroke-2"}
|
41
43
|
variant={`searchsm`}
|
42
|
-
strokeClass=
|
44
|
+
strokeClass={
|
45
|
+
props?.isDarkMode ? "stroke-neutral-0" : "stroke-neutral-1000"
|
46
|
+
}
|
43
47
|
/>
|
44
48
|
</div>
|
45
49
|
</div>
|