What should I do to make the badge wrap all the text? #3006
-
I've tried adding <Header className="text-wrap overflow-hidden overflow-ellipsis whitespace-nowrap mb-0"
title={course?.titulo ?? "Aguarde..."}
subtitle={modulo?.titulo ?? ""}
/>
<div>
<h1 className={`text-wrap font-bold text-2xl ${className}`}>{title}</h1>
{subtitle && (
<div className="badge badge-ghost mt-3">
<h2 className={`font-normal text-sm ${className}`}>{subtitle}</h2>
</div>
)}
</div> |
Beta Was this translation helpful? Give feedback.
Answered by
saadeghi
Apr 29, 2024
Replies: 1 comment
-
Well, that text doesn't fit in that space, whether if it's badge or not. Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
saadeghi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, that text doesn't fit in that space, whether if it's badge or not.
You can use Tailwind CSS utility class
truncate
to cut the string like this:https://play.tailwindcss.com/cWsFinffS5
Let me know if you have a question.