import * as React from 'react' import Image from 'next/image' import Link from 'next/link' import { IconArrowRight16 } from '@hashicorp/flight-icons/svg-react/arrow-right-16' import s from './style.module.css' export interface IoHomeFeatureProps { isInternalLink: (link: string) => boolean link?: string image: { url: string alt: string } heading: string description: string } export default function IoHomeFeature({ isInternalLink, link, image, heading, description, }: IoHomeFeatureProps): React.ReactElement { return (
{image.alt}

{heading}

{description}

{link ? ( Learn more{' '} ) : null}
) } interface IoHomeFeatureWrapProps { isInternalLink: (link: string) => boolean href: string children: React.ReactNode } function IoHomeFeatureWrap({ isInternalLink, href, children, }: IoHomeFeatureWrapProps) { if (!href) { return
{children}
} if (isInternalLink(href)) { return ( {children} ) } return ( {children} ) }