import clsx from 'clsx' import { ReactNode } from 'react' import { TooltipInfoIcon } from './tooltip' export type InfoLineCardProps = { /** * Info label. */ label: string /** * Optional tooltip to display next to the label. */ tooltip?: string /** * Optional image URL to the left of the label. */ imageUrl?: string /** * Info value. If this is a string, it will be wrapped in a

tag. */ value: ReactNode /** * Additional classes to apply to the

tag wrapping the value if a string. */ valueClassName?: string /** * Additional classes to apply to the container. */ className?: string } export const InfoLineCard = ({ label, tooltip, imageUrl, value, valueClassName, className, }: InfoLineCardProps) => { return (

{imageUrl && (
)}

{label}

{!!tooltip && ( )}
{typeof value === 'string' ? (

{value}

) : ( value )}
) }