design: add a subtle scale animation to buttons

This commit is contained in:
Xylight committed 2024-10-04 14:42:57 -07:00
1 parent 30c25bab22
commit 88e9a91c60
3 files changed
+49 -19

No files matched your search

@@ -131,13 +131,14 @@
/>
<Button
size="sm"
size="custom"
href={postLink(post.post)}
class="!text-inherit h-full px-3 relative"
color="ghost"
rounding="pill"
target={$userSettings.openLinksInNewTab ? '_blank' : ''}
title={$t('post.actions.comments')}
animations={{ scale: true, large: false }}
>
{@const newComment =
publishedToDate(post.counts.newest_comment_time).getTime() >
@@ -163,6 +164,7 @@
color="ghost"
rounding="pill"
class={buttonSquare}
animations={{ scale: true, large: true }}
>
<Icon src={BugAnt} micro size="16" slot="prefix" />
</Button>
@@ -193,6 +195,7 @@
loading={saving}
disabled={saving}
title={post.saved ? $t('post.actions.unsave') : $t('post.actions.save')}
animations={{ scale: true, large: true }}
>
<Icon
src={post.saved ? BookmarkSlash : Bookmark}
@@ -217,6 +220,7 @@
rounding="pill"
size="custom"
class={buttonSquare}
animations={{ scale: true, large: true }}
>
<Icon slot="prefix" src={EllipsisHorizontal} width={16} micro />
</Button>
@@ -21,7 +21,7 @@
{href}
on:click
on:contextmenu
class="font-normal block {selected
class="font-normal block !origin-left {selected
? 'text-primary-900 dark:!text-primary-100 bg-slate-100 dark:bg-zinc-800'
: 'text-slate-600 dark:text-zinc-400'} {$$props.class}"
>