0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

@astrojs/image: Add fetchpriority to Picture types (#7059)

* Add `fetchpriority` to `Picture` types

* Add changeset
This commit is contained in:
Caleb Jasik 2023-05-11 07:40:53 -05:00 committed by GitHub
parent c87d42e766
commit ebb40f5cb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/image': patch
---
Add `fetchpriority` to allowed `Picture` attributes in `@astrojs/image`

View file

@ -27,7 +27,7 @@ export interface ImageComponentRemoteImageProps extends TransformOptions, ImgHTM
export interface PictureComponentLocalImageProps
extends GlobalHTMLAttributes,
Omit<TransformOptions, 'src'>,
Pick<ImgHTMLAttributes, 'loading' | 'decoding'> {
Pick<ImgHTMLAttributes, 'loading' | 'decoding' | 'fetchpriority'> {
src: ImageMetadata | Promise<{ default: ImageMetadata }>;
/** Defines an alternative text description of the image. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel). */
alt: string;
@ -39,7 +39,7 @@ export interface PictureComponentLocalImageProps
export interface PictureComponentRemoteImageProps
extends GlobalHTMLAttributes,
TransformOptions,
Pick<ImgHTMLAttributes, 'loading' | 'decoding'> {
Pick<ImgHTMLAttributes, 'loading' | 'decoding' | 'fetchpriority'> {
src: string;
/** Defines an alternative text description of the image. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel). */
alt: string;