Merge pull request #23 from Morkowski/heart-animation

heart animation
This commit is contained in:
Jon Staab 2023-02-22 11:31:19 -06:00 committed by GitHub
commit db342d30a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,15 @@
@tailwind components;
@tailwind utilities;
@layer utilities {
.fa-beat-custom {
--fa-animation-duration: 0.4s;
--fa-fade-opacity: 0.6;
--fa-animation-iteration-count: 1;
--fa-beat-scale: 1.4;
}
}
@font-face {
font-family: "Montserrat";
font-style: normal;

View File

@ -262,7 +262,7 @@
{$repliesCount}
</div>
<div class={cx({'text-accent': like})}>
<button class="fa fa-heart cursor-pointer" on:click={() => like ? deleteReaction(like) : react("+")} />
<button class={cx('fa fa-heart cursor-pointer', {'fa-beat fa-beat-custom': like})} on:click={() => like ? deleteReaction(like) : react("+")} />
{$likesCount}
</div>
<div>