import { ArrowLeftIcon, Box, sprinkles, Text } from "@saleor/macaw-ui/next"; import React, { PropsWithChildren } from "react"; import { Link } from "react-router-dom"; import useAppChannel from "./AppChannelContext"; import AppChannelSelect from "./AppChannelSelect"; import { topBarHeight } from "./consts"; interface TopNavProps { title: string | React.ReactNode; href?: string; } export const TopNav: React.FC> = ({ title, href, children, }) => { const { availableChannels, channel, isPickerActive, setChannel } = useAppChannel(false); return ( {href && ( )} {title} {isPickerActive && ( )} {children} ); };