fix: render action button in the card only when actionButton.child is present (#9064)

Co-authored-by: Praveen Kumar <praveenkumar@Praveens-MacBook-Pro.local>
pull/9147/head
Praveen Kumar D 2023-05-25 20:28:44 +05:30 committed by GitHub
parent f51823c24b
commit 4631805924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -152,12 +152,14 @@ export function Card({
{learnMore.text}
</LinkComponent>
)}
<button
className="text-default hover:text-emphasis p-0 text-xs font-normal"
color="minimal"
onClick={actionButton?.onClick}>
{actionButton?.child}
</button>
{actionButton?.child && (
<button
className="text-default hover:text-emphasis p-0 text-xs font-normal"
color="minimal"
onClick={actionButton?.onClick}>
{actionButton?.child}
</button>
)}
</div>
)}
</div>