Add blurhash support to cards #153

This commit is contained in:
Prayag Prajapati committed 2023-08-29 23:42:07 +05:30
1 parent 821090612e
commit 7dd5fd89f8
8 files changed
+197 -110

No files matched your search

+11
View File
@@ -48,6 +48,7 @@ export const Card = ({
isFavorite,
isPlayed,
imageType = "Primary",
imageBlurhash,
cardType,
secondaryText,
queryKey,
@@ -97,6 +98,16 @@ export const Card = ({
width: "100%",
}}
>
{!!imageBlurhash && (
<Blurhash
hash={imageBlurhash}
width={128}
height={128}
resolutionX={24}
resolutionY={24}
className="card-image-blurhash"
/>
)}
<Box className="card-image-icon-container">
{TypeIconCollectionCard[itemType]}
</Box>
+9 -1
View File
@@ -6,7 +6,7 @@
object-fit: cover;
transition: opacity $transition-time-fast;
position: absolute;
z-index: 0;
z-index: 1;
top: 0;
left: 0;
&-container {
@@ -31,6 +31,14 @@
z-index: 0;
}
}
&-blurhash {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
}
}
&-overlay {
position: absolute;