import React, { memo } from 'react'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; import makeStyles from '@mui/styles/makeStyles'; import { Link } from '../../@navigation/link'; import { ReactSVG } from 'react-svg'; import createClasses from './styles'; export interface InfoCardItemProps { /** * The text that will be displayed at top of the component. */ title: string; /** * The text that will be displayed in the second line. */ subtitle?: string; /** * Providing this prop will make the subtitle become a link. */ href?: string; /** * Providing this prop will override subtitle. */ icons?: { src: string }[]; } const InfoCardItem = (props: InfoCardItemProps) => { const { title, href, icons, subtitle } = props; const classes = createClasses(); return ( {title} {icons?.length && ( {icons.map(icon => { const { src } = icon; return ; })} )} {!icons?.length && (href ? ( {subtitle} ) : ( {subtitle} ))} ); }; const m = memo(InfoCardItem); export { m as InfoCardItem };