import React from 'react'; import { Box, BoxProps, ChevronIcon, color, Fade, Flex, FlexProps, space, Stack, StxInline, IconButton, } from '@stacks/ui'; import { Link, LinkProps, Text } from '@components/typography'; import MenuIcon from 'mdi-react/MenuIcon'; import CloseIcon from 'mdi-react/CloseIcon'; import { useMobileMenuState } from '@common/hooks/use-mobile-menu'; import { ForwardRefExoticComponentWithAs, forwardRefWithAs } from '@stacks/ui-core'; import NextLink from 'next/link'; import { StacksDocsLogo } from '@components/stacks-docs-logo'; import { ColorModeButton } from '@components/color-mode-button'; import { SearchButton } from '@components/search-button'; import { border, transition } from '@common/utils'; import { getCapsizeStyles } from '@components/mdx/typography'; import { useTouchable } from '@common/hooks/use-touchable'; import { useRouter } from 'next/router'; const MenuButton = ({ ...rest }: any) => { const { isOpen, handleOpen, handleClose } = useMobileMenuState(); const Icon = isOpen ? CloseIcon : MenuIcon; const handleClick = isOpen ? handleClose : handleOpen; return ( ); }; const HeaderWrapper: React.FC = React.forwardRef((props, ref: any) => ( )); interface NavChildren { label: string; href?: string; target?: string; } interface NavItem { label: string; href: string; target?: string; children?: NavItem[]; } const nav: NavItem[] = [ { label: 'Start building', href: '', children: [ { label: 'Documentation', href: 'https://docs.stacks.co/', target: '_self', }, { label: 'GitHub', href: 'https://github.com/stacks-network', }, { label: 'Resources', href: 'https://www.stacks.co/learn/learning-resources', }, { label: 'Discord', href: 'https://discord.gg/5DJaBrf', }, { label: 'Forum', href: 'https://forum.stacks.org', }, ], }, { label: 'Discover apps', href: 'https://www.stacks.co/explore/discover-apps' }, ]; const HeaderTextItem: ForwardRefExoticComponentWithAs = forwardRefWithAs< BoxProps & LinkProps, 'a' >(({ children, href, as = 'a', ...rest }, ref) => ( {children} )); const NavItem: React.FC = ({ item, ...props }) => { const { hover, active, bind } = useTouchable({ behavior: 'link', }); return ( {item.label} {item.children ? ( ) : null} {item.children ? ( {styles => ( {item.children.map((child, _key) => ( {child.label} ))} )} ) : null} ); }; const Navigation: React.FC = props => { return ( {nav.map((item, key) => ( ))} ); }; const LogoLink = React.memo(() => { return ( ); }); const Header = ({ hideSubBar, ...rest }: any) => { return ( <> ); }; export { Header };