@luxfi/ui 5.3.19 → 5.3.21
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.
|
@@ -16,17 +16,22 @@ const DesktopHeader: React.FC<{
|
|
|
16
16
|
currentAs: string | undefined
|
|
17
17
|
links: LinkDef[]
|
|
18
18
|
className?: string
|
|
19
|
+
noAuth?: boolean
|
|
19
20
|
}> = ({
|
|
20
21
|
links,
|
|
21
|
-
className = ''
|
|
22
|
+
className = '',
|
|
23
|
+
noAuth=false
|
|
22
24
|
}) => {
|
|
23
25
|
const [isMenuOpened, setIsMenuOpen] = React.useState(false);
|
|
24
|
-
const opendMenuClass = isMenuOpened ? " h-full" : ""
|
|
25
26
|
|
|
26
27
|
// TODO move 13px into a size class and configure twMerge to recognize say, 'text-size-nav'
|
|
27
28
|
// (vs be beat out by 'text-color-nav')
|
|
28
29
|
return (
|
|
29
|
-
<header className={cn(
|
|
30
|
+
<header className={cn(
|
|
31
|
+
'bg-[rgba(0, 0, 0, 0.5)] !backdrop-blur-3xl fixed z-header top-0 left-0 right-0',
|
|
32
|
+
className,
|
|
33
|
+
isMenuOpened ? ' h-full' : ''
|
|
34
|
+
)} >
|
|
30
35
|
{/* md or larger */}
|
|
31
36
|
<div className={
|
|
32
37
|
'flex flex-row h-[80px] items-center justify-between ' +
|
|
@@ -40,7 +45,7 @@ const DesktopHeader: React.FC<{
|
|
|
40
45
|
</div>
|
|
41
46
|
<div className='flex items-center'>
|
|
42
47
|
<DesktopBagPopup popupClx='w-[340px]' trigger={<BagButton className='text-primary -mr-[3px] lg:min-w-0' />} />
|
|
43
|
-
<AuthWidget />
|
|
48
|
+
<AuthWidget noLogin={noAuth}/>
|
|
44
49
|
</div>
|
|
45
50
|
</div>
|
|
46
51
|
</header>
|
|
@@ -19,24 +19,22 @@ const Header: React.FC<{
|
|
|
19
19
|
// TODO
|
|
20
20
|
const [open, setOpen] = React.useState<boolean>(false);
|
|
21
21
|
|
|
22
|
-
const { nav: { common, featured }, currentAs } = siteDef
|
|
22
|
+
const { nav: { common, featured }, currentAs, noAuth } = siteDef
|
|
23
23
|
const links = (featured) ? [...common, ...featured] : common
|
|
24
|
-
const isDesktopView = (): boolean => {
|
|
25
|
-
if (typeof window === 'undefined') return false
|
|
26
|
-
return window.innerWidth > 768
|
|
27
|
-
}
|
|
28
24
|
|
|
29
25
|
return (<>
|
|
30
26
|
<DesktopHeader
|
|
31
27
|
className={cn(className, 'hidden md:flex')}
|
|
32
28
|
links={links}
|
|
33
29
|
currentAs={currentAs}
|
|
30
|
+
noAuth={noAuth}
|
|
34
31
|
/>
|
|
35
32
|
<MobileHeader
|
|
36
33
|
className={cn(className, 'md:hidden')}
|
|
37
34
|
links={links}
|
|
38
35
|
currentAs={currentAs}
|
|
39
36
|
setChatbotOpen={setOpen}
|
|
37
|
+
noAuth={noAuth}
|
|
40
38
|
/>
|
|
41
39
|
</>)
|
|
42
40
|
}
|
|
@@ -26,11 +26,13 @@ const MobileHeader: React.FC<{
|
|
|
26
26
|
links: LinkDef[]
|
|
27
27
|
className?: string,
|
|
28
28
|
setChatbotOpen: (open: boolean) => void,
|
|
29
|
+
noAuth?: boolean
|
|
29
30
|
}> = ({
|
|
30
31
|
currentAs,
|
|
31
32
|
links,
|
|
32
33
|
className = '',
|
|
33
34
|
setChatbotOpen,
|
|
35
|
+
noAuth=false // :aa TODO
|
|
34
36
|
}) => {
|
|
35
37
|
const cmmc = useCommerce()
|
|
36
38
|
const [menuState, setMenuState] = useState<'closed' | 'nav' | 'login' | 'bag'>('closed')
|
package/package.json
CHANGED