Fix answers not wrapping in cards

This commit is contained in:
James Grugett 2022-05-02 10:35:46 -04:00
parent 0a63a0ae1f
commit d6a9b89c43

View File

@ -1,3 +1,4 @@
import clsx from 'clsx'
import { Answer } from '../../common/answer' import { Answer } from '../../common/answer'
import { getProbability } from '../../common/calculate' import { getProbability } from '../../common/calculate'
import { import {
@ -126,7 +127,14 @@ export function AnswerLabel(props: {
truncated = text.slice(0, 75) + '...' truncated = text.slice(0, 75) + '...'
} }
return <span className={className}>{truncated}</span> return (
<span
style={{ wordBreak: 'break-word' }}
className={clsx('whitespace-pre-line break-words', className)}
>
{truncated}
</span>
)
} }
function FreeResponseAnswerToolTip(props: { function FreeResponseAnswerToolTip(props: {