File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,11 +24,15 @@ export interface FluidObject {
2424 media ?: string
2525}
2626
27- interface GatsbyImageProps {
27+ interface GatsbyImageOptionalProps {
28+ /**
29+ * @deprecated Use `fixed`
30+ */
2831 resolutions ?: FixedObject
32+ /**
33+ * @deprecated Use `fluid`
34+ */
2935 sizes ?: FluidObject
30- fixed ?: FixedObject | FixedObject [ ]
31- fluid ?: FluidObject | FluidObject [ ]
3236 fadeIn ?: boolean
3337 durationFadeIn ?: number
3438 title ?: string
@@ -49,6 +53,16 @@ interface GatsbyImageProps {
4953 loading ?: `auto` | `lazy` | `eager`
5054 draggable ?: boolean
5155}
56+
57+ interface GatsbyImageFluidProps extends GatsbyImageOptionalProps {
58+ fluid : FluidObject | FluidObject [ ]
59+ }
60+
61+ interface GatsbyImageFixedProps extends GatsbyImageOptionalProps {
62+ fixed : FixedObject | FixedObject [ ]
63+ }
64+
65+ export type GatsbyImageProps = GatsbyImageFluidProps | GatsbyImageFixedProps
5266
5367export default class GatsbyImage extends React . Component <
5468 GatsbyImageProps ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as React from "react"
22
33import GatsbyImage , { GatsbyImageProps } from "../index"
44
5- interface GatsbyImageWithIEPolyfillProps extends GatsbyImageProps {
5+ type GatsbyImageWithIEPolyfillProps = GatsbyImageProps & {
66 objectFit ?: `fill` | `contain` | `cover` | `none` | `scale-down`
77 objectPosition ?: string
88}
You can’t perform that action at this time.
0 commit comments