Fix some Picture component typescript errors

This commit is contained in:
prototypa
2023-01-31 14:50:23 -05:00
parent 67f43c68bf
commit d4560c1226
2 changed files with 7 additions and 2 deletions

View File

@ -23,11 +23,13 @@ const image = await findImage(post.image);
src={image}
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
widths={[400, 900]}
width="400"
height="224"
width={400}
height={224}
sizes="(max-width: 900px) 400px, 900px"
alt={post.title}
aspectRatio="16:9"
loading="lazy"
decoding="async"
/>
)
}

View File

@ -61,6 +61,9 @@ const { post, url } = Astro.props;
aspectRatio={16 / 9}
width={900}
height={506}
loading="eager"
decoding="async"
background={undefined}
/>
) : (
<div class="max-w-3xl mx-auto px-4 sm:px-6">