Skip to content

🎥 Make videos programmatically with React

Update CardLikeButton.tsx

JonnyBurgerfddf6edf399a
diff --git a/packages/promo-pages/src/components/prompts/CardLikeButton.tsx b/packages/promo-pages/src/components/prompts/CardLikeButton.tsx
index 5338489df1..40d7f948e1 100644
--- a/packages/promo-pages/src/components/prompts/CardLikeButton.tsx
+++ b/packages/promo-pages/src/components/prompts/CardLikeButton.tsx
@@ -59,7 +59,11 @@ export const CardLikeButton: React.FC<{
);
return (
- <button onClick={onClick} className="flex items-center bg-transparent border-none cursor-pointer p-0" type="button">
+ <button
+ onClick={onClick}
+ className="flex items-center bg-transparent border-none cursor-pointer p-0"
+ type="button"
+ >
<Heart
height={16}
fill={liked ? 'var(--color-brand)' : 'none'}
@@ -68,7 +72,11 @@ export const CardLikeButton: React.FC<{
bottomRoundnessAdjustment={roundness}
style={{transform: `scale(${scale})`, marginTop: 2}}
/>
- <span className="font-brand font-medium" style={{marginLeft: 8, flex: 1}}>
+ <span
+ className="font-brand font-medium data-[liked=true]:text-brand data-[liked=false]:text-black"
+ data-liked={liked}
+ style={{marginLeft: 8, flex: 1}}
+ >
{formatLikeCount(likeCount)}
</span>
</button>