For a reactjs app, I use Material-ui (https://material-ui.com/) for the design. And I need to write text in card that match exactly 2 lines.
What I've already done works when text can be contained in 2 or 1 lines, but for longer text, the cut becomes before word and it is not ellipsis.
Here what I've done
<Box
fontSize="h5.fontSize"
component="div"
overflow="hidden"
textOverflow="ellipsis"
height={70}
>
{title}
</Box>
The result is good on the first card, for on the second one, the last word 'Floooooo' is displayed in the hidden part (the third line) but not in the second line with ellipsis. I've tried to add whiteSpace="nowrap" but the text is only 1 line height (fig 2)
Can you help me please?