Add blurhash support to cards #153
This commit is contained in:
8 files changed
+197
-110
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user