diff --git a/packages/gatsby-image/index.d.ts b/packages/gatsby-image/index.d.ts index 8f7e934da6aeb..7a2d20af81fc1 100644 --- a/packages/gatsby-image/index.d.ts +++ b/packages/gatsby-image/index.d.ts @@ -30,6 +30,7 @@ interface GatsbyImageProps { fixed?: FixedObject | FixedObject[] fluid?: FluidObject | FluidObject[] fadeIn?: boolean + durationFadeIn?: number title?: string alt?: string className?: string | object @@ -38,11 +39,12 @@ interface GatsbyImageProps { style?: object imgStyle?: object placeholderStyle?: object + placeholderClassName?: string backgroundColor?: string | boolean onLoad?: () => void - onStartLoad?: (param: { wasCached: boolean }) => void onError?: (event: any) => void onClick?: () => void + onStartLoad?: (param: { wasCached: boolean }) => void Tag?: string itemProp?: string loading?: `auto` | `lazy` | `eager` diff --git a/packages/gatsby-image/src/index.js b/packages/gatsby-image/src/index.js index faeae8520c8ed..cafc490bd9902 100644 --- a/packages/gatsby-image/src/index.js +++ b/packages/gatsby-image/src/index.js @@ -657,6 +657,10 @@ const fluidObject = PropTypes.shape({ media: PropTypes.string, }) +// If you modify these propTypes, please don't forget to update following files as well: +// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/index.d.ts +// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/README.md#gatsby-image-props +// https://github.com/gatsbyjs/gatsby/blob/master/docs/docs/gatsby-image.md#gatsby-image-props Image.propTypes = { resolutions: fixedObject, sizes: fluidObject, diff --git a/packages/gatsby-image/src/withIEPolyfill/index.js b/packages/gatsby-image/src/withIEPolyfill/index.js index 1bed0a73e5732..12eef5ec5b8f8 100644 --- a/packages/gatsby-image/src/withIEPolyfill/index.js +++ b/packages/gatsby-image/src/withIEPolyfill/index.js @@ -36,6 +36,10 @@ class ImageWithIEPolyfill extends Component { } } +// If you modify these propTypes, please don't forget to update following files as well: +// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/withIEPolyfill/index.d.ts +// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/README.md#gatsby-image-props +// https://github.com/gatsbyjs/gatsby/blob/master/docs/docs/gatsby-image.md#gatsby-image-props ImageWithIEPolyfill.propTypes = { objectFit: PropTypes.string, objectPosition: PropTypes.string,