import React from 'react'; import { Box, BoxProps, ChevronIcon, color, Fade, Flex, FlexProps, space, Stack, StacksLogo, 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 { 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.blockstack.org/', target: '_self', }, { label: 'GitHub', href: 'https://github.com/blockstack', }, { label: 'Papers', href: 'https://www.blockstack.org/papers', }, { label: 'Discord', href: 'https://discord.com/invite/6PcCMU', }, ], }, { label: 'Testnet', href: 'https://www.blockstack.org/testnet' }, { label: 'Discover apps', href: 'https://app.co/' }, ]; 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 ( Docs ); }); const Header = ({ hideSubBar, ...rest }: any) => { return ( <> ); }; export { Header };