fix: app card description truncation (#26722)
* Fix app card description truncation * Refactor AppCard description paragraph for line clamping --------- Co-authored-by: Deepanshu Verma <deepanshuverma186@email.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
This commit is contained in:
co-authored by
Deepanshu Verma
Anik Dhabal Babu
parent
40a7f53d1f
commit
22201cbc75
@@ -127,17 +127,9 @@ export function AppCard({ app, credentials, searchText, userAdminTeams }: AppCar
|
||||
<span>{props.rating} stars</span> <Icon name="star" className="ml-1 mt-0.5 h-4 w-4 text-yellow-600" />
|
||||
<span className="pl-1 text-subtle">{props.reviews} reviews</span>
|
||||
</div> */}
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: Content is sanitized via markdownToSafeHTML */}
|
||||
<p
|
||||
className="text-default mt-2 grow text-sm"
|
||||
dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(app.description) }}
|
||||
style={{
|
||||
overflow: "hidden",
|
||||
display: "-webkit-box",
|
||||
WebkitBoxOrient: "vertical",
|
||||
WebkitLineClamp: "3",
|
||||
}}
|
||||
/>
|
||||
<p className="text-default mt-2 text-sm line-clamp-3">
|
||||
{markdownToSafeHTML(app.description).replace(/<[^>]+>/g, "")}
|
||||
</p>
|
||||
|
||||
<div className="mt-5 flex max-w-full flex-row justify-between gap-2">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user