import { Box, Text } from "@saleor/macaw-ui/next"; import React, { PropsWithChildren } from "react"; import useAppChannel from "../AppChannelContext"; import AppChannelSelect from "../AppChannelSelect"; import { TopNavLink } from "./TopNavLink"; import { TopNavWrapper } from "./TopNavWrapper"; interface TopNavProps { title: string | React.ReactNode; href?: string; withoutBorder?: boolean; isAlignToRight?: boolean; } export const Root: React.FC> = ({ title, href, withoutBorder = false, isAlignToRight = true, children, }) => { const { availableChannels, channel, isPickerActive, setChannel } = useAppChannel(false); return ( {href && } {title} {isPickerActive && ( )} {children} ); };