chore: update icon heart to stars
This commit is contained in:
parent
fcfae4127e
commit
fb15687388
@ -1,4 +1,4 @@
|
||||
import { IconHeart, IconHeartFilled } from '@tabler/icons-react'
|
||||
import { IconStar, IconStarFilled } from '@tabler/icons-react'
|
||||
import { useFavoriteModel } from '@/hooks/useFavoriteModel'
|
||||
|
||||
interface FavoriteModelActionProps {
|
||||
@ -10,14 +10,15 @@ export function FavoriteModelAction({ model }: FavoriteModelActionProps) {
|
||||
const isModelFavorite = isFavorite(model.id)
|
||||
|
||||
return (
|
||||
<div aria-label="Toggle favorite"
|
||||
<div
|
||||
aria-label="Toggle favorite"
|
||||
className="size-6 cursor-pointer flex items-center justify-center rounded hover:bg-main-view-fg/10 transition-all duration-200 ease-in-out"
|
||||
onClick={() => toggleFavorite(model)}
|
||||
>
|
||||
{isModelFavorite ? (
|
||||
<IconHeartFilled size={18} className="text-main-view-fg" />
|
||||
<IconStarFilled size={18} className="text-main-view-fg" />
|
||||
) : (
|
||||
<IconHeart size={18} className="text-main-view-fg/50" />
|
||||
<IconStar size={18} className="text-main-view-fg/50" />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user