import React, { FC } from 'react'; import Box from '@mui/material/Box'; import escapeHTML from 'escape-html'; import type { TextLine } from './cardHelper'; interface CardTextProps { className?: string; textLine: TextLine; } const CardText: FC = ({ className, textLine }) => { const { title, titleAction } = textLine; const renderCardText = () => { if (titleAction) { return ( {escapeHTML(titleAction.title)} ); } else { return title; } }; return {renderCardText()}; }; export default CardText;