@luxfi/ui 5.5.3 → 5.6.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.
- package/dist/accordion.cjs +213 -0
- package/dist/accordion.js +186 -0
- package/dist/alert.cjs +553 -0
- package/dist/alert.js +531 -0
- package/dist/avatar.cjs +149 -0
- package/dist/avatar.js +125 -0
- package/dist/badge.cjs +611 -0
- package/dist/badge.js +589 -0
- package/dist/button.cjs +689 -0
- package/dist/button.js +664 -0
- package/dist/checkbox.cjs +265 -0
- package/dist/checkbox.js +241 -0
- package/dist/close-button.cjs +73 -0
- package/dist/close-button.js +51 -0
- package/dist/collapsible.cjs +702 -0
- package/dist/collapsible.js +679 -0
- package/dist/color-mode.cjs +96 -0
- package/dist/color-mode.js +72 -0
- package/dist/dialog.cjs +279 -0
- package/dist/dialog.js +246 -0
- package/dist/drawer.cjs +207 -0
- package/dist/drawer.js +175 -0
- package/dist/empty-state.cjs +93 -0
- package/dist/empty-state.js +71 -0
- package/dist/field.cjs +183 -0
- package/dist/field.js +160 -0
- package/dist/heading.cjs +46 -0
- package/dist/heading.js +40 -0
- package/dist/icon-button.cjs +491 -0
- package/dist/icon-button.js +470 -0
- package/dist/image.cjs +572 -0
- package/dist/image.js +551 -0
- package/dist/index.cjs +5779 -0
- package/dist/index.js +5619 -0
- package/dist/input-group.cjs +155 -0
- package/dist/input-group.js +133 -0
- package/dist/input.cjs +65 -0
- package/dist/input.js +59 -0
- package/dist/link.cjs +630 -0
- package/dist/link.js +606 -0
- package/dist/menu.cjs +305 -0
- package/dist/menu.js +269 -0
- package/dist/pin-input.cjs +182 -0
- package/dist/pin-input.js +160 -0
- package/dist/popover.cjs +327 -0
- package/dist/popover.js +294 -0
- package/dist/progress-circle.cjs +152 -0
- package/dist/progress-circle.js +128 -0
- package/dist/progress.cjs +117 -0
- package/dist/progress.js +94 -0
- package/dist/provider.cjs +62 -0
- package/dist/provider.js +40 -0
- package/dist/radio.cjs +177 -0
- package/dist/radio.js +153 -0
- package/dist/rating.cjs +80 -0
- package/dist/rating.js +58 -0
- package/dist/select.cjs +791 -0
- package/dist/select.js +757 -0
- package/dist/separator.cjs +57 -0
- package/dist/separator.js +51 -0
- package/dist/skeleton.cjs +370 -0
- package/dist/skeleton.js +346 -0
- package/dist/slider.cjs +138 -0
- package/dist/slider.js +115 -0
- package/dist/switch.cjs +163 -0
- package/dist/switch.js +140 -0
- package/dist/table.cjs +1044 -0
- package/dist/table.js +1013 -0
- package/dist/tabs.cjs +240 -0
- package/dist/tabs.js +213 -0
- package/dist/tag.cjs +651 -0
- package/dist/tag.js +628 -0
- package/dist/textarea.cjs +65 -0
- package/dist/textarea.js +59 -0
- package/dist/toaster.cjs +99 -0
- package/dist/toaster.js +96 -0
- package/dist/tooltip.cjs +171 -0
- package/dist/tooltip.js +148 -0
- package/dist/utils.cjs +11 -0
- package/dist/utils.js +9 -0
- package/package.json +270 -65
- package/src/accordion.tsx +285 -0
- package/src/alert.tsx +221 -0
- package/src/avatar.tsx +174 -0
- package/src/badge.tsx +158 -0
- package/src/button.tsx +411 -0
- package/src/checkbox.tsx +307 -0
- package/src/close-button.tsx +51 -0
- package/src/collapsible.tsx +126 -0
- package/src/color-mode.tsx +125 -0
- package/src/dialog.tsx +356 -0
- package/src/drawer.tsx +186 -0
- package/src/empty-state.tsx +97 -0
- package/src/field.tsx +202 -0
- package/src/heading.tsx +55 -0
- package/src/icon-button.tsx +192 -0
- package/src/image.tsx +280 -0
- package/src/index.ts +192 -0
- package/src/input-group.tsx +159 -0
- package/src/input.tsx +60 -0
- package/src/link.tsx +326 -0
- package/src/menu.tsx +471 -0
- package/src/pin-input.tsx +187 -0
- package/src/popover.tsx +400 -0
- package/src/progress-circle.tsx +180 -0
- package/src/progress.tsx +109 -0
- package/src/provider.tsx +12 -0
- package/src/radio.tsx +175 -0
- package/src/rating.tsx +79 -0
- package/src/select.tsx +696 -0
- package/src/separator.tsx +59 -0
- package/src/skeleton.tsx +302 -0
- package/src/slider.tsx +152 -0
- package/src/switch.tsx +158 -0
- package/src/table.tsx +621 -0
- package/src/tabs.tsx +354 -0
- package/src/tag.tsx +159 -0
- package/src/textarea.tsx +60 -0
- package/src/toaster.tsx +117 -0
- package/src/tokens.css +438 -0
- package/src/tooltip.tsx +184 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils.ts +6 -0
- package/tokens.css +438 -0
- package/commerce/ui/conf.ts +0 -13
- package/commerce/ui/context.tsx +0 -123
- package/commerce/ui/store.ts +0 -295
- package/components/access-code-input.tsx +0 -71
- package/components/analytics.tsx +0 -23
- package/components/auth/auth-listener.tsx +0 -29
- package/components/auth/auth-token/clear-auth-token.tsx +0 -12
- package/components/auth/auth-token/set-auth-token.tsx +0 -16
- package/components/auth/common-auth-domains.ts +0 -17
- package/components/auth/login-panel.tsx +0 -111
- package/components/auth/mobile-login-button.tsx +0 -107
- package/components/auth/signup-panel.tsx +0 -113
- package/components/back-button.tsx +0 -49
- package/components/chat-widget.tsx +0 -85
- package/components/commerce/bag-button.tsx +0 -98
- package/components/commerce/buy-button.tsx +0 -34
- package/components/commerce/checkout-button.tsx +0 -129
- package/components/commerce/checkout-panel/cart-accordian.tsx +0 -66
- package/components/commerce/checkout-panel/checkout-panel-props.ts +0 -10
- package/components/commerce/checkout-panel/desktop-bag-carousel.tsx +0 -36
- package/components/commerce/checkout-panel/desktop-cp.tsx +0 -83
- package/components/commerce/checkout-panel/index.tsx +0 -126
- package/components/commerce/checkout-panel/mobile-cp.tsx +0 -67
- package/components/commerce/checkout-panel/policy-links.tsx +0 -29
- package/components/commerce/checkout-panel/steps-indicator.tsx +0 -39
- package/components/commerce/checkout-panel/thank-you.tsx +0 -18
- package/components/commerce/desktop-bag-popup.tsx +0 -78
- package/components/commerce/drawer/index.tsx +0 -88
- package/components/commerce/drawer/micro.tsx +0 -145
- package/components/commerce/drawer/shell.tsx +0 -85
- package/components/contact-dialog/contact-form.tsx +0 -116
- package/components/contact-dialog/disclaimer.tsx +0 -13
- package/components/contact-dialog/index.tsx +0 -64
- package/components/copyright.tsx +0 -21
- package/components/drawer-margin.tsx +0 -28
- package/components/footer.tsx +0 -78
- package/components/header/desktop-nav-menu.tsx +0 -204
- package/components/header/desktop.tsx +0 -65
- package/components/header/index.tsx +0 -50
- package/components/header/mobile-bag-drawer.tsx +0 -51
- package/components/header/mobile-menu-toggle-button.tsx +0 -35
- package/components/header/mobile-nav-menu-ai.tsx +0 -51
- package/components/header/mobile-nav-menu-item.tsx +0 -47
- package/components/header/mobile-nav-menu.tsx +0 -102
- package/components/header/mobile.tsx +0 -170
- package/components/header/theme-toggle.tsx +0 -26
- package/components/icons/avatar.tsx +0 -11
- package/components/icons/bag-icon.tsx +0 -10
- package/components/icons/index.ts +0 -6
- package/components/icons/left-arrow.tsx +0 -11
- package/components/icons/lux-logo.tsx +0 -10
- package/components/icons/right-arrow.tsx +0 -10
- package/components/icons/social-icon.tsx +0 -35
- package/components/icons/social-svg.css +0 -3
- package/components/index.ts +0 -26
- package/components/logo.tsx +0 -92
- package/components/main.tsx +0 -27
- package/components/mini-chart/index.tsx +0 -8
- package/components/mini-chart/mini-chart-props.ts +0 -44
- package/components/mini-chart/mini-chart.tsx +0 -85
- package/components/mini-chart/wrapper.tsx +0 -23
- package/components/not-found/index.tsx +0 -28
- package/components/not-found/not-found-content.mdx +0 -5
- package/components/tooltip.tsx +0 -31
- package/environment.d.ts +0 -6
- package/next/analytics/fpixel.ts +0 -16
- package/next/analytics/google-analytics.ts +0 -14
- package/next/analytics/index.ts +0 -3
- package/next/analytics/pixel-analytics.tsx +0 -55
- package/next/font/get-app-router-font-classes.ts +0 -17
- package/next/font/load-and-return-lux-next-fonts-on-import.ts +0 -68
- package/next/font/local/Druk-Wide-Bold.ttf +0 -0
- package/next/font/local/Druk-Wide-Medium.ttf +0 -0
- package/next/font/local/InterVariable-Italic.ttf +0 -0
- package/next/font/local/InterVariable-Italic.woff2 +0 -0
- package/next/font/local/InterVariable.ttf +0 -0
- package/next/font/local/InterVariable.woff2 +0 -0
- package/next/font/next-font-desc.ts +0 -28
- package/next/font/pages-router-font-vars.tsx +0 -18
- package/next/head-metadata/from-next/metadata-types.ts +0 -158
- package/next/head-metadata/from-next/opengraph-types.ts +0 -267
- package/next/head-metadata/from-next/twitter-types.ts +0 -92
- package/next/head-metadata/index.tsx +0 -208
- package/next/index.ts +0 -2
- package/next/middleware/determine-device-mw.ts +0 -29
- package/root-layout/WHY_THIS_IS_SEPARATE.txt +0 -2
- package/root-layout/index.tsx +0 -112
- package/site-def/footer/community.tsx +0 -61
- package/site-def/footer/company.ts +0 -37
- package/site-def/footer/ecosystem.ts +0 -37
- package/site-def/footer/index.tsx +0 -26
- package/site-def/footer/legal.ts +0 -28
- package/site-def/footer/network.ts +0 -45
- package/site-def/footer/svg/warpcast-logo.svg +0 -12
- package/site-def/index.ts +0 -4
- package/site-def/main-nav.tsx +0 -460
- package/style/cart-animation.css +0 -29
- package/style/checkout-animation.css +0 -23
- package/style/drawer-handle-overrides.css +0 -160
- package/style/fonts/COPY_TO_PUBLIC_FOR_NON_NEXT.txt +0 -0
- package/style/fonts/Druk-Wide-Bold.ttf +0 -0
- package/style/fonts/Druk-Wide-Medium.ttf +0 -0
- package/style/fonts/InterVariable-Italic.ttf +0 -0
- package/style/fonts/InterVariable-Italic.woff2 +0 -0
- package/style/fonts/InterVariable.ttf +0 -0
- package/style/fonts/InterVariable.woff2 +0 -0
- package/style/lux-colors.css +0 -85
- package/style/lux-fonts.css +0 -30
- package/style/lux-global-non-next.css +0 -52
- package/style/lux-global.css +0 -51
- package/tailwind/fontFamily.tailwind.lux.ts +0 -18
- package/tailwind/index.ts +0 -2
- package/tailwind/lux-tw-fonts.ts +0 -40
- package/tailwind/tailwind.config.lux-preset.ts +0 -10
- package/tsconfig.json +0 -15
- package/types/chatbot-config.ts +0 -7
- package/types/chatbot-suggested-question.ts +0 -7
- package/types/contact-info.ts +0 -11
- package/types/index.ts +0 -4
- package/types/site-def.ts +0 -46
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React, { type PropsWithChildren } from 'react'
|
|
3
|
-
|
|
4
|
-
import type { SiteDef } from '../../site-def'
|
|
5
|
-
|
|
6
|
-
import DesktopHeader from './desktop'
|
|
7
|
-
import MobileHeader from './mobile'
|
|
8
|
-
import { cn } from '@hanzo/ui/util'
|
|
9
|
-
import { type LogoVariant } from '../logo'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/** children will render furthest right */
|
|
13
|
-
const Header: React.FC<{
|
|
14
|
-
siteDef: SiteDef
|
|
15
|
-
className?: string
|
|
16
|
-
logoVariant?: LogoVariant
|
|
17
|
-
} & PropsWithChildren> = ({
|
|
18
|
-
siteDef,
|
|
19
|
-
className = '',
|
|
20
|
-
children,
|
|
21
|
-
logoVariant='text-only'
|
|
22
|
-
}) => {
|
|
23
|
-
|
|
24
|
-
// TODO
|
|
25
|
-
const [open, setOpen] = React.useState<boolean>(false);
|
|
26
|
-
|
|
27
|
-
const { nav: { common, featured }, currentAs, noAuth, commerce } = siteDef
|
|
28
|
-
const links = (featured) ? [...common, ...featured] : common
|
|
29
|
-
|
|
30
|
-
return (<>
|
|
31
|
-
<DesktopHeader
|
|
32
|
-
className={cn(className, 'hidden md:flex')}
|
|
33
|
-
links={links}
|
|
34
|
-
currentAs={currentAs}
|
|
35
|
-
noAuth={noAuth}
|
|
36
|
-
noCommerce={!!!commerce}
|
|
37
|
-
logoVariant={logoVariant}
|
|
38
|
-
>{children}</DesktopHeader>
|
|
39
|
-
<MobileHeader
|
|
40
|
-
className={cn(className, 'md:hidden')}
|
|
41
|
-
links={links}
|
|
42
|
-
currentAs={currentAs}
|
|
43
|
-
setChatbotOpen={setOpen}
|
|
44
|
-
noAuth={noAuth}
|
|
45
|
-
noCommerce={!!!commerce}
|
|
46
|
-
/>
|
|
47
|
-
</>)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export default Header
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { Drawer, DrawerContent} from '@hanzo/ui/primitives'
|
|
5
|
-
import { cn } from '@hanzo/ui/util'
|
|
6
|
-
import { CartPanel } from '@hanzo/commerce'
|
|
7
|
-
|
|
8
|
-
import BagButton from '../commerce/bag-button'
|
|
9
|
-
|
|
10
|
-
const MobileBagDrawer: React.FC<{
|
|
11
|
-
open: boolean,
|
|
12
|
-
setOpen: (b: boolean) => void
|
|
13
|
-
handleCheckout: () => void
|
|
14
|
-
className?: string
|
|
15
|
-
}> = ({
|
|
16
|
-
open,
|
|
17
|
-
setOpen,
|
|
18
|
-
handleCheckout,
|
|
19
|
-
className='',
|
|
20
|
-
}) => {
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Drawer open={open} onOpenChange={setOpen}>
|
|
24
|
-
<DrawerContent className={cn('rounded-t-xl mt-6 pb-12 h-auto', className)} >
|
|
25
|
-
<CartPanel
|
|
26
|
-
handleCheckout={handleCheckout}
|
|
27
|
-
className='mt-4 mb-4 border-none py-0 px-4 w-full '
|
|
28
|
-
listClx='rounded-sm pr-3'
|
|
29
|
-
scrollAfter={5}
|
|
30
|
-
itemClx='mt-2'
|
|
31
|
-
totalClx='sticky px-1 pr-2 border rounded-sm -bottom-[1px] bg-background'
|
|
32
|
-
buttonClx='max-w-[220px] flex-none'
|
|
33
|
-
>
|
|
34
|
-
<div className='flex flex-row items-center flex-none justify-center '>
|
|
35
|
-
<BagButton
|
|
36
|
-
animateOnHover={false}
|
|
37
|
-
showIfEmpty
|
|
38
|
-
className=
|
|
39
|
-
'mr-2 relative w-6 h-7'
|
|
40
|
-
iconClx='fill-foreground '
|
|
41
|
-
/>
|
|
42
|
-
<p className='font-heading text-foreground text-default'>Your Bag</p>
|
|
43
|
-
</div>
|
|
44
|
-
<div className='h-[1px] w-pr-80 bg-muted-3 mx-auto mt-1.5 flex-none'/>
|
|
45
|
-
</CartPanel>
|
|
46
|
-
</DrawerContent>
|
|
47
|
-
</Drawer>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default MobileBagDrawer
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React, { useState } from 'react'
|
|
3
|
-
|
|
4
|
-
import { Plus } from 'lucide-react'
|
|
5
|
-
|
|
6
|
-
import { Button } from '@hanzo/ui/primitives'
|
|
7
|
-
import { cn } from '@hanzo/ui/util'
|
|
8
|
-
|
|
9
|
-
const MobileMenuToggleButton: React.FC<{
|
|
10
|
-
open: boolean
|
|
11
|
-
setOpen: (b: boolean) => void
|
|
12
|
-
className?: string
|
|
13
|
-
}> = ({
|
|
14
|
-
open,
|
|
15
|
-
setOpen,
|
|
16
|
-
className=''
|
|
17
|
-
}) => {
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Button
|
|
21
|
-
variant='ghost'
|
|
22
|
-
size='default'
|
|
23
|
-
rounded='full'
|
|
24
|
-
onClick={() => {setOpen(!open)}}
|
|
25
|
-
className={cn('p-0 aspect-square hover:bg-background sm:hover:bg-level-1 active:scale-75', className)}
|
|
26
|
-
>
|
|
27
|
-
<Plus width={28} height={28} className={
|
|
28
|
-
'block h-full will-change-transform transition-transform transition-scale transition-duration-[1500] ' +
|
|
29
|
-
(open ? 'rotate-[135deg] scale-110' : 'rotate-none')
|
|
30
|
-
} />
|
|
31
|
-
</Button>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export default MobileMenuToggleButton
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React, { useState } from 'react'
|
|
3
|
-
import { ArrowRight, Plus } from 'lucide-react'
|
|
4
|
-
import { Button, Card } from '@hanzo/ui/primitives'
|
|
5
|
-
import { Logo } from '..'
|
|
6
|
-
|
|
7
|
-
interface MobileNavMenuAIProps {
|
|
8
|
-
setMenuOpen: (open: boolean) => void
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const MobileNavMenuAI: React.FC<MobileNavMenuAIProps> = ({ setMenuOpen }) => {
|
|
12
|
-
const [isOpen, setIsOpen] = useState<boolean>(false)
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<>
|
|
16
|
-
<div className="w-full text-2xl cursor-pointer">
|
|
17
|
-
<div className='flex justify-between'>
|
|
18
|
-
<Logo variant='text-only' size='md' outerClx={'p-6 h-full'} />
|
|
19
|
-
<Plus width={28} height={28} className={
|
|
20
|
-
'block h-full aspect-square hover:bg-background sm:hover:bg-level-1 active:scale-75 text-foreground will-change-transform transition-transform transition-scale transition-duration-[1500] mt-6 mr-6 ' +
|
|
21
|
-
(!open ? 'rotate-none' : 'rotate-[135deg] scale-110')
|
|
22
|
-
} onClick={() => setMenuOpen(false)} />
|
|
23
|
-
</div>
|
|
24
|
-
<div className="flex items-center gap-5 border-b border-[#3A3A3A] mt-4 rounded-full bg-muted-4 mx-6">
|
|
25
|
-
<div className="text-muted-1 font-bold flex-1 flex justify-between min-h-12 items-center px-2" onClick={() => setIsOpen(true)}>
|
|
26
|
-
<span className='text-base pl-2 font-light'>Ask AI a question</span>
|
|
27
|
-
<ArrowRight />
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div className={
|
|
32
|
-
'fixed bottom-0 sm:bottom-16 right-0 w-full h-full ' +
|
|
33
|
-
'sm:max-w-[400px] sm:max-h-[550px] sm:px-4 z-floating ' +
|
|
34
|
-
(isOpen ? 'flex' : 'hidden')
|
|
35
|
-
}>
|
|
36
|
-
<Card className='flex flex-col h-full w-full'>
|
|
37
|
-
<div className='flex px-4 py-2 h-16 bg-level-0 items-center justify-between'>
|
|
38
|
-
<h3 className='font-semibold font-heading'>LUX<span className='opacity-60'>AI</span></h3>
|
|
39
|
-
<Button onClick={() => setIsOpen(false)} variant='link' size='icon' className='w-fit sm:hidden'>
|
|
40
|
-
<Plus className='w-6 h-6 flex-none mr-1 rotate-45 transition-transform' />
|
|
41
|
-
</Button>
|
|
42
|
-
</div>
|
|
43
|
-
<iframe src="https://lux.chat/iframe" className='h-full' />
|
|
44
|
-
</Card>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
</>
|
|
48
|
-
)
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export default MobileNavMenuAI;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import Link from 'next/link'
|
|
3
|
-
|
|
4
|
-
import type { LinkDefExtended } from '../../site-def/main-nav'
|
|
5
|
-
import { LeftArrow, RightArrow } from '../icons'
|
|
6
|
-
import MobileNavMenuAI from './mobile-nav-menu-ai'
|
|
7
|
-
|
|
8
|
-
const MobileNavMenuItem: React.FC<{
|
|
9
|
-
link: LinkDefExtended,
|
|
10
|
-
setMenuOpen: (open: boolean) => void
|
|
11
|
-
}> = ({
|
|
12
|
-
link,
|
|
13
|
-
setMenuOpen
|
|
14
|
-
}) => {
|
|
15
|
-
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<>
|
|
19
|
-
<div className="w-full flex items-center px-5 py-3 gap-[27px] text-2xl cursor-pointer" onClick={() => setIsOpen(true)}>
|
|
20
|
-
<span className='block w-[18px] h-[22px] items-center'>{link.icon}</span>
|
|
21
|
-
<span className='flex-1'>{link.title}</span>
|
|
22
|
-
<RightArrow className='' />
|
|
23
|
-
</div>
|
|
24
|
-
<div className={`fixed left-0 top-0 w-screen h-screen ${isOpen ? 'block' : 'hidden'}`} style={{ backgroundColor: 'black' }}>
|
|
25
|
-
<MobileNavMenuAI setMenuOpen={setMenuOpen} />
|
|
26
|
-
<div className="w-full flex items-center px-5 py-3 gap-[27px] text-2xl font-bold" onClick={() => setIsOpen(false)}>
|
|
27
|
-
<LeftArrow />
|
|
28
|
-
<span className="text-white">{link.title}</span>
|
|
29
|
-
</div>
|
|
30
|
-
<div className="flex flex-col">
|
|
31
|
-
{link.childMenu?.map((menu, index) => {
|
|
32
|
-
return (
|
|
33
|
-
<Link href={menu.href}>
|
|
34
|
-
<div className="w-full flex items-center px-5 py-3 gap-[27px] text-2xl" key={index}>
|
|
35
|
-
<span className='w-[18px] h-[22px] self-center flex items-center justify-center'>{menu.icon}</span>
|
|
36
|
-
<span className='flex-1'>{menu.title}</span>
|
|
37
|
-
</div>
|
|
38
|
-
</Link>
|
|
39
|
-
)
|
|
40
|
-
})}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default MobileNavMenuItem
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
4
|
-
import { cn } from '@hanzo/ui/util'
|
|
5
|
-
import type { LinkDefExtended, ChildMenu } from '../../site-def/main-nav'
|
|
6
|
-
import MobileNavMenuAI from './mobile-nav-menu-ai'
|
|
7
|
-
import MobileNavMenuItem from './mobile-nav-menu-item'
|
|
8
|
-
import MobileAuthWidget from '../auth/mobile-login-button'
|
|
9
|
-
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@hanzo/ui/primitives'
|
|
10
|
-
import { ChevronDown } from 'lucide-react'
|
|
11
|
-
import Link from 'next/link'
|
|
12
|
-
|
|
13
|
-
const MobileNav: React.FC<{
|
|
14
|
-
currentAs: string | undefined
|
|
15
|
-
links: LinkDefExtended[]
|
|
16
|
-
className?: string
|
|
17
|
-
commonItemClx?: string | ((def: LinkDef) => string)
|
|
18
|
-
setChatbotOpen: (open: boolean) => void
|
|
19
|
-
setMenuOpen: (open: boolean) => void
|
|
20
|
-
setMenuState: (arg: 'closed' | 'nav' | 'login' | 'bag') => void
|
|
21
|
-
}> = ({
|
|
22
|
-
currentAs,
|
|
23
|
-
links,
|
|
24
|
-
setMenuState,
|
|
25
|
-
className = '',
|
|
26
|
-
commonItemClx,
|
|
27
|
-
setChatbotOpen,
|
|
28
|
-
setMenuOpen
|
|
29
|
-
}) => (
|
|
30
|
-
links.length > 0 ? (
|
|
31
|
-
<div className={cn('flex flex-col h-full', className)}>
|
|
32
|
-
<MobileNavMenuAI setMenuOpen={setMenuOpen} />
|
|
33
|
-
<div className="flex flex-col flex-1 overflow-auto">
|
|
34
|
-
<Accordion type="single" collapsible className='w-full h-full'>
|
|
35
|
-
{links.map((el, index) => {
|
|
36
|
-
const itemClx = (commonItemClx) ? (typeof commonItemClx === 'string' ? commonItemClx : commonItemClx(el)) : ''
|
|
37
|
-
const variant = el.variant ?? 'link'
|
|
38
|
-
let internalClx = variant === 'link'
|
|
39
|
-
? ' text-muted hover:text-foreground active:text-accent rounded-none'
|
|
40
|
-
: ' min-w-0'
|
|
41
|
-
|
|
42
|
-
if (currentAs && currentAs === el.href) {
|
|
43
|
-
internalClx += ' pointer-events-none'
|
|
44
|
-
if (variant === 'link') {
|
|
45
|
-
internalClx += ' text-accent'
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (!el.isAIMenu) {
|
|
50
|
-
return (
|
|
51
|
-
<AccordionItem key={index} value={el.title ? el.title : ""} className='!no-underline !border-0 px-6'>
|
|
52
|
-
<AccordionTrigger className={cn(internalClx, itemClx, '')}>
|
|
53
|
-
<div className={cn(internalClx, itemClx, 'flex items-center justify-between w-full pl-3 text-base font-normal leading-6')}>
|
|
54
|
-
{el.title}
|
|
55
|
-
</div>
|
|
56
|
-
<ChevronDown className="w-4 h-4 mr-3" />
|
|
57
|
-
</AccordionTrigger>
|
|
58
|
-
<AccordionContent>
|
|
59
|
-
{el.childMenu && (
|
|
60
|
-
<div className="px-4">
|
|
61
|
-
{Object.entries(el.childMenu.reduce((acc, child) => {
|
|
62
|
-
const group = acc[child.groupName ? child.groupName : ""] || []
|
|
63
|
-
group.push(child)
|
|
64
|
-
acc[child.groupName ? child.groupName : ""] = group
|
|
65
|
-
return acc
|
|
66
|
-
}, {} as { [key: string]: ChildMenu[] })).map(([groupName, children]) => (
|
|
67
|
-
<div key={groupName}>
|
|
68
|
-
<div className="mt-4 mb-4 font-light text-muted-1">{groupName}</div>
|
|
69
|
-
{children.map((child, childIndex) => (
|
|
70
|
-
<div key={childIndex} className="m-2">
|
|
71
|
-
<div className="flex items-center py-1">
|
|
72
|
-
<span>
|
|
73
|
-
{child.icon && child.icon}
|
|
74
|
-
</span>
|
|
75
|
-
<Link
|
|
76
|
-
href={child.href}
|
|
77
|
-
className="text-muted-2 hover:underline ml-5 hover:text-primary"
|
|
78
|
-
target={child.newTab ? '_blank' : '_self'}
|
|
79
|
-
rel="noopener noreferrer"
|
|
80
|
-
>
|
|
81
|
-
{child.title}
|
|
82
|
-
</Link>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
))}
|
|
86
|
-
</div>
|
|
87
|
-
))}
|
|
88
|
-
</div>
|
|
89
|
-
)}
|
|
90
|
-
</AccordionContent>
|
|
91
|
-
</AccordionItem>
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
})}
|
|
95
|
-
</Accordion>
|
|
96
|
-
</div>
|
|
97
|
-
<MobileAuthWidget className='text-2xl z-10' handleLogin={() => { setMenuState('login') }} />
|
|
98
|
-
</div>
|
|
99
|
-
) : null
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
export default MobileNav;
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React, { useState, useEffect } from 'react'
|
|
3
|
-
import { useRouter } from 'next/navigation'
|
|
4
|
-
|
|
5
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
6
|
-
import { cn } from '@hanzo/ui/util'
|
|
7
|
-
|
|
8
|
-
import { CartPanel, useCommerce } from '@hanzo/commerce'
|
|
9
|
-
import { LoginPanel } from '@hanzo/auth/components'
|
|
10
|
-
import sendGAEvent from '../../next/analytics/google-analytics'
|
|
11
|
-
|
|
12
|
-
import { Avatar, Bag } from '../icons'
|
|
13
|
-
import { Logo } from '..'
|
|
14
|
-
|
|
15
|
-
import MenuToggleButton from './mobile-menu-toggle-button'
|
|
16
|
-
import BagButton from '../commerce/bag-button'
|
|
17
|
-
import MobileBagDrawer from './mobile-bag-drawer'
|
|
18
|
-
import NavMenu from './mobile-nav-menu'
|
|
19
|
-
|
|
20
|
-
const bagClx = 'mt-4 mb-8 border-none py-0 px-4 w-full ' +
|
|
21
|
-
'sm:min-w-[350px] sm:max-w-[500px] sm:mx-auto min-h-[60vh] max-h-[70vh] ' +
|
|
22
|
-
'sm:animate-in sm:zoom-in-90 '
|
|
23
|
-
|
|
24
|
-
const MobileHeader: React.FC<{
|
|
25
|
-
currentAs: string | undefined
|
|
26
|
-
links: LinkDef[]
|
|
27
|
-
className?: string
|
|
28
|
-
setChatbotOpen: (open: boolean) => void
|
|
29
|
-
noAuth?: boolean
|
|
30
|
-
noCommerce?: boolean
|
|
31
|
-
}> = ({
|
|
32
|
-
currentAs,
|
|
33
|
-
links,
|
|
34
|
-
className = '',
|
|
35
|
-
setChatbotOpen,
|
|
36
|
-
noAuth=false, // :aa TODO
|
|
37
|
-
noCommerce=false // :aa TODO
|
|
38
|
-
}) => {
|
|
39
|
-
const cmmc = useCommerce()
|
|
40
|
-
const [menuState, setMenuState] = useState<'closed' | 'nav' | 'login' | 'bag'>('closed')
|
|
41
|
-
const [bagDrawerOpen, setBagDrawerOpen] = useState<boolean>(false)
|
|
42
|
-
const router = useRouter()
|
|
43
|
-
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (menuState === 'bag' || bagDrawerOpen) {
|
|
46
|
-
sendGAEvent('view_cart', {
|
|
47
|
-
items: cmmc.cartItems.map((item) => ({
|
|
48
|
-
item_id: item.sku,
|
|
49
|
-
item_name: item.title,
|
|
50
|
-
item_category: item.familyId,
|
|
51
|
-
price: item.price,
|
|
52
|
-
quantity: item.quantity
|
|
53
|
-
})),
|
|
54
|
-
value: cmmc.cartTotal,
|
|
55
|
-
currency: 'USD',
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
}, [menuState, bagDrawerOpen])
|
|
59
|
-
|
|
60
|
-
const menuOpen = () => (menuState !== 'closed')
|
|
61
|
-
|
|
62
|
-
const onLoginChanged = (token: string) => {
|
|
63
|
-
// by def, menu was in state 'login'
|
|
64
|
-
if (!!token) { setMenuState('nav') }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const setMenuOpen = (open: boolean) => {
|
|
68
|
-
if (!open) {
|
|
69
|
-
setMenuState('closed')
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
setMenuState('nav')
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const handleCheckout = () => {
|
|
77
|
-
setMenuState('closed')
|
|
78
|
-
setBagDrawerOpen(false)
|
|
79
|
-
router.push('/checkout')
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const openBag = () => {
|
|
83
|
-
if (menuOpen()) {
|
|
84
|
-
setMenuState('bag')
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
setBagDrawerOpen(true)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// header element MUST be fixed, and NOT sticky. Or else drawer breaks on mobile browsers
|
|
91
|
-
return (<>
|
|
92
|
-
<header id='MOBILE_HEADER' className={cn(
|
|
93
|
-
`bg-background fixed z-header top-0 left-0 w-full ${menuOpen() ? 'hidden' : 'block'}`,
|
|
94
|
-
className
|
|
95
|
-
)}>
|
|
96
|
-
{/* smaller than md: mobile style drawer menu; h-11 is 44px, the standard mobile header height */}
|
|
97
|
-
<div className='w-full h-full flex flex-row justify-between items-center font-bold pr-5'>
|
|
98
|
-
<Logo href='/' size='md' outerClx={'p-6 h-full'} variant='text-only' />
|
|
99
|
-
{/* Not that key to the cross-fade effect
|
|
100
|
-
is that this is **on top of** the logo. */}
|
|
101
|
-
{menuOpen() && (
|
|
102
|
-
<div className={'absolute left-0 top-0 bottom-0 right-0 pl-8 ' +
|
|
103
|
-
'flex flex-row ' +
|
|
104
|
-
'bg-background animate-mobile-menu-open'
|
|
105
|
-
}>
|
|
106
|
-
<Avatar className='self-center ' />
|
|
107
|
-
</div>
|
|
108
|
-
)}
|
|
109
|
-
<div className='flex gap-0 flex-row'>
|
|
110
|
-
<BagButton className='text-primary -mr-[3px]' onClick={openBag} />
|
|
111
|
-
<MenuToggleButton className='text-foreground' open={menuOpen()} setOpen={setMenuOpen} />
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
</div>
|
|
115
|
-
</header>
|
|
116
|
-
{!noCommerce && (
|
|
117
|
-
<MobileBagDrawer
|
|
118
|
-
className=''
|
|
119
|
-
open={bagDrawerOpen}
|
|
120
|
-
setOpen={setBagDrawerOpen}
|
|
121
|
-
handleCheckout={handleCheckout}
|
|
122
|
-
/>
|
|
123
|
-
)}
|
|
124
|
-
|
|
125
|
-
{menuOpen() && (
|
|
126
|
-
<div className={
|
|
127
|
-
'fixed top-0 left-0 w-full h-full ' +
|
|
128
|
-
// z must below header itself
|
|
129
|
-
'flex flex-column bg-background z-below-header animate-mobile-menu-open'
|
|
130
|
-
}>
|
|
131
|
-
{(!!!noAuth && menuState === 'login') ? (
|
|
132
|
-
<LoginPanel noHeading onLoginChanged={onLoginChanged} className='sm:animate-in sm:zoom-in-90' />
|
|
133
|
-
) : (
|
|
134
|
-
(!!!noCommerce && menuState === 'bag') ? (
|
|
135
|
-
|
|
136
|
-
<CartPanel
|
|
137
|
-
handleCheckout={() => { router.push('/checkout') }}
|
|
138
|
-
className={bagClx}
|
|
139
|
-
listClx='rounded-sm'
|
|
140
|
-
scrollAfter={6}
|
|
141
|
-
scrollHeightClx='h-[80vh]'
|
|
142
|
-
itemClx='mt-2'
|
|
143
|
-
totalClx='sticky px-1 pr-2 border rounded-sm -bottom-[1px] bg-level-1'
|
|
144
|
-
buttonClx='max-w-[220px] flex-none'
|
|
145
|
-
>
|
|
146
|
-
<div className='flex flex-row items-center flex-none justify-center '>
|
|
147
|
-
<Bag className='mr-2 relative w-4 h-5 fill-foreground ' />
|
|
148
|
-
<p className='font-heading text-foreground text-default'>Your Bag</p>
|
|
149
|
-
</div>
|
|
150
|
-
<div className='h-[1px] w-pr-80 bg-muted-3 mx-auto mt-1.5 flex-none' />
|
|
151
|
-
</CartPanel>
|
|
152
|
-
|
|
153
|
-
) : ( /* menuState === 'nav' */
|
|
154
|
-
<NavMenu
|
|
155
|
-
currentAs={currentAs}
|
|
156
|
-
links={links}
|
|
157
|
-
className='sm:animate-in sm:zoom-in-90 w-full'
|
|
158
|
-
commonItemClx='px-0 text-xl h-16 justify-start '
|
|
159
|
-
setMenuState={setMenuState}
|
|
160
|
-
setChatbotOpen={setChatbotOpen}
|
|
161
|
-
setMenuOpen={setMenuOpen}
|
|
162
|
-
/>
|
|
163
|
-
)
|
|
164
|
-
)}
|
|
165
|
-
</div>
|
|
166
|
-
) /* menuOpen */}
|
|
167
|
-
</>)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export default MobileHeader
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { Moon, Sun } from 'lucide-react'
|
|
5
|
-
import { useTheme } from 'next-themes'
|
|
6
|
-
|
|
7
|
-
import { Button } from '@hanzo/ui/primitives'
|
|
8
|
-
|
|
9
|
-
const ThemeToggle: React.FC = () => {
|
|
10
|
-
|
|
11
|
-
const { setTheme, theme } = useTheme()
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<Button
|
|
15
|
-
variant='ghost'
|
|
16
|
-
size='icon'
|
|
17
|
-
onClick={() => {setTheme(theme === 'light' ? 'dark' : 'light')}}
|
|
18
|
-
>
|
|
19
|
-
<Sun className='h-[1.5rem] w-[1.3rem] dark:hidden' />
|
|
20
|
-
<Moon className='hidden h-5 w-5 dark:block' />
|
|
21
|
-
<span className='sr-only'>Toggle theme</span>
|
|
22
|
-
</Button>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default ThemeToggle
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { type LucideProps } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
const Avatar: React.FC<LucideProps> = (props: LucideProps) => (
|
|
5
|
-
<svg width="17" height="21" viewBox="0 0 17 21" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
6
|
-
<path d="M8.66112 10.3544C6.14668 10.3544 4.32664 6.91073 4.32664 4.59206C4.32664 2.12213 6.27238 0.115723 8.66112 0.115723C11.0499 0.115723 12.9956 2.12514 12.9956 4.59206C12.9956 6.91398 11.1756 10.3544 8.66112 10.3544ZM8.66112 1.1542C6.82539 1.1542 5.33242 2.69703 5.33242 4.59185C5.33242 6.65402 6.94715 9.31553 8.66112 9.31553C10.3761 9.31553 11.9898 6.65387 11.9898 4.5925C11.9898 2.69668 10.4969 1.15398 8.66112 1.15398V1.1542Z" fill="white" />
|
|
7
|
-
<path d="M6.79776 11.3345H10.5242C13.7802 11.3345 16.4302 14.0712 16.4302 17.4338C16.4302 19.0831 15.1297 20.423 13.5356 20.423H3.78923C2.19216 20.423 0.894689 19.0831 0.894689 17.4338C0.893706 14.0712 3.54156 11.3345 6.79776 11.3345ZM3.78819 19.3844H13.5337C14.5749 19.3844 15.4225 18.509 15.4225 17.4338C15.4225 14.6453 13.2253 12.3731 10.5223 12.3731H6.79862C4.0956 12.3731 1.89839 14.6423 1.89839 17.4338C1.89937 18.509 2.74701 19.3844 3.78816 19.3844H3.78819Z" fill="white" />
|
|
8
|
-
</svg>
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
export default Avatar
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { type LucideProps } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
const BagIcon: React.FC<LucideProps> = (props: LucideProps) => (
|
|
5
|
-
<svg fill="none" viewBox="0 0 1019 1281" {...props}>
|
|
6
|
-
<path d="m977.243 365.553h-175.407v-90.629c0-151.923-131.968-274.924-292.334-274.924-160.367 0-292.337 123.002-292.337 274.924v90.629h-175.4023c-23.3886 0-41.7627 17.051-41.7627 38.756v775.121c0 55.8 48.4456 100.76 108.582 100.76h801.84c60.138 0 108.578-44.96 108.578-100.76v-775.121c0-21.705-18.37-38.756-41.757-38.756zm-676.553-90.629c0-108.517 93.546-196.9408 208.812-196.9408 115.265 0 208.813 88.4218 208.813 196.9408v89.08h-417.625z" fill="currentColor"/>
|
|
7
|
-
</svg>
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
export default BagIcon
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as Avatar } from './avatar'
|
|
2
|
-
export { default as Bag } from './bag-icon'
|
|
3
|
-
export { default as LeftArrow } from './left-arrow'
|
|
4
|
-
export { default as LuxLogo } from './lux-logo'
|
|
5
|
-
export { default as RightArrow } from './right-arrow'
|
|
6
|
-
export { default as SocialIcon, type SocialIconProps } from './social-icon'
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { type LucideProps } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
const LeftArrow: React.FC<LucideProps> = (props: LucideProps) => (
|
|
5
|
-
<svg width="10" height="16" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
6
|
-
<path d="M1.06975 7.44328C0.679224 7.83381 0.679224 8.46697 1.06975 8.8575L7.43371 15.2215C7.82423 15.612 8.4574 15.612 8.84792 15.2215C9.23845 14.8309 9.23845 14.1978 8.84792 13.8072L3.19107 8.15039L8.84792 2.49354C9.23845 2.10301 9.23845 1.46985 8.84792 1.07932C8.4574 0.688798 7.82423 0.688798 7.43371 1.07932L1.06975 7.44328ZM1.77686 9.15039H2.49037V7.15039H1.77686V9.15039Z" fill="white"/>
|
|
7
|
-
</svg>
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
export default LeftArrow
|
|
11
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { type LucideProps } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
const LuxLogo: React.FC<LucideProps> = (props: LucideProps) => (
|
|
5
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" {...props}>
|
|
6
|
-
<polygon points="25,46.65 50,3.35 0,3.35" fill="white" stroke='black' strokeWidth={props.strokeWidth}/>
|
|
7
|
-
</svg>
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
export default LuxLogo
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { type LucideProps } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
const RightArrow: React.FC<LucideProps> = (props: LucideProps) => (
|
|
5
|
-
<svg width="9" height="16" viewBox="0 0 9 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
6
|
-
<path d="M8.33797 7.58293C8.72849 7.97346 8.72849 8.60662 8.33797 8.99715L1.97401 15.3611C1.58348 15.7516 0.950316 15.7516 0.559792 15.3611C0.169267 14.9706 0.169267 14.3374 0.559792 13.9469L6.21665 8.29004L0.559792 2.63318C0.169267 2.24266 0.169267 1.6095 0.559792 1.21897C0.950316 0.828447 1.58348 0.828447 1.97401 1.21897L8.33797 7.58293ZM7.63086 9.29004H6.91734V7.29004H7.63086V9.29004Z" fill="white"/>
|
|
7
|
-
</svg>
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
export default RightArrow
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { SocialIcon as BaseSocialIcon } from 'react-social-icons'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@hanzo/ui/util'
|
|
6
|
-
import './social-svg.css'
|
|
7
|
-
|
|
8
|
-
interface SocialIconProps {
|
|
9
|
-
// one of these: https://github.com/couetilc/react-social-icons/tree/main/db
|
|
10
|
-
network: string
|
|
11
|
-
size: number
|
|
12
|
-
className?: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const SocialIcon: React.FC<SocialIconProps> = ({
|
|
16
|
-
network,
|
|
17
|
-
size,
|
|
18
|
-
className = ''
|
|
19
|
-
}) => (
|
|
20
|
-
<BaseSocialIcon
|
|
21
|
-
network={network}
|
|
22
|
-
as='div'
|
|
23
|
-
// This is set up so the enclosing element sets the color.
|
|
24
|
-
// For example, something like 'color-foreground hover:color-muted-1'
|
|
25
|
-
className={cn('color-inherit', className)}
|
|
26
|
-
bgColor='transparent'
|
|
27
|
-
fgColor='currentColor'
|
|
28
|
-
style={{height: size, width: size, flex: 'none' }}
|
|
29
|
-
/>
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
type SocialIconProps,
|
|
34
|
-
SocialIcon as default
|
|
35
|
-
}
|