import Link from 'next/link' import { HStack, SpanBox, VStack } from './LayoutPrimitives' import { ArrowRightIcon } from './icons/ArrowRightIcon' import { theme } from '../tokens/stitches.config' import { ReactNode } from 'react' import { Button } from './Button' import { CloseIcon } from './icons/CloseIcon' export type SuggestionAction = { url: string text: string } type SuggestionBoxProps = { helpMessage: string suggestions: SuggestionAction[] size?: 'large' | 'small' background?: string dismissible?: boolean onDismiss?: () => void } type InternalOrExternalLinkProps = { link: string children: ReactNode } const InternalOrExternalLink = (props: InternalOrExternalLinkProps) => { const isExternal = props.link.startsWith('https') return ( {!isExternal ? ( {props.children} ) : ( {props.children} )} ) } export const SuggestionBox = (props: SuggestionBoxProps) => { return ( {props.dismissible && ( )} {props.helpMessage} {props.suggestions.map((suggestion, idx) => { return ( <>{suggestion.text} ) })} ) }