mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-16 18:55:37 +02:00
🐛 fix: Fix loading animation for images
This commit is contained in:
@@ -73,11 +73,12 @@ export const BasicImageLoader = component$((props: ImageLoaderProps) => {
|
||||
<>
|
||||
{!imageLoaded.value && !hasError.value && (
|
||||
<div
|
||||
class={cn("relative x-[20] inset-0 h-full loading-animation bg-gradient-to-r from-gray-200 via-gray-300 to-gray-200 dark:from-gray-800 dark:via-gray-900 dark:to-gray-800", props.class)}
|
||||
style={{
|
||||
height: props.height,
|
||||
aspectRatio: props.width && props.height ? `${props.width} / ${props.height}` : 'auto'
|
||||
}}
|
||||
class={
|
||||
cn(
|
||||
" w-full h-full loading-animation bg-gradient-to-r from-gray-200 via-gray-300 to-gray-200 dark:from-gray-800 dark:via-gray-900 dark:to-gray-800",
|
||||
props.class
|
||||
)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user