Skip to content

Commit 566f165

Browse files
authored
fix: increase favorite icon size in icon mode (#660)
1 parent f14e0f3 commit 566f165

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/routes/resources/favorite.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ export function FavoriteToggle({
8383
const nextIntent = isFavorite ? 'remove' : 'add'
8484
const isBusy = fetcher.state !== 'idle'
8585

86+
// Icon-only buttons sit next to other 24px icons (ex: 𝕏 on calls pages),
87+
// so bump the icon size in `mode="icon"` to match.
88+
const iconSize = mode === 'icon' ? 24 : 18
8689
const icon = isBusy ? (
87-
<SpinnerIcon size={18} className="animate-spin" />
90+
<SpinnerIcon size={iconSize} className="animate-spin" />
8891
) : (
89-
<StarIcon size={18} filled={isFavorite} />
92+
<StarIcon size={iconSize} filled={isFavorite} />
9093
)
9194

9295
const text = isFavorite ? 'Favorited' : label

0 commit comments

Comments
 (0)