Skip to content

Commit

Permalink
fix(gatsby-plugin-image): Fixes to plugin utils types (#29204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jan 26, 2021
1 parent 0ddbbfe commit b236f49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface GatsbyImageProps
imgClassName?: string
image: IGatsbyImageData
imgStyle?: CSSProperties
backgroundColor?: CSSProperties["backgroundColor"]
backgroundColor?: string
objectFit?: CSSProperties["objectFit"]
objectPosition?: CSSProperties["objectPosition"]
onLoad?: () => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ISharpGatsbyImageArgs } from "../image-utils"

export interface IStaticImageProps
extends Omit<GatsbyImageProps, "image">,
ISharpGatsbyImageArgs {
Omit<ISharpGatsbyImageArgs, "backgroundColor"> {
src: string
}

Expand Down
3 changes: 1 addition & 2 deletions packages/gatsby-plugin-image/src/image-utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable no-unused-expressions */
import { stripIndent } from "common-tags"
import { IGatsbyImageData } from "."
import type sharp from "gatsby-plugin-sharp/safe-sharp"

const DEFAULT_PIXEL_DENSITIES = [0.25, 0.5, 1, 2]
export const DEFAULT_BREAKPOINTS = [750, 1080, 1366, 1920]
Expand Down Expand Up @@ -46,7 +45,7 @@ export interface ISharpGatsbyImageArgs {
quality?: number
transformOptions?: {
fit?: Fit
cropFocus?: typeof sharp.strategy | typeof sharp.gravity | string
cropFocus?: number | string
}
jpgOptions?: Record<string, unknown>
pngOptions?: Record<string, unknown>
Expand Down

0 comments on commit b236f49

Please sign in to comment.