Skip to content

Instantly share code, notes, and snippets.

@a9kitkumar
Created April 30, 2019 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a9kitkumar/1881ce52c260367bac09db5ed34e294e to your computer and use it in GitHub Desktop.
Save a9kitkumar/1881ce52c260367bac09db5ed34e294e to your computer and use it in GitHub Desktop.
import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
const Iphone8 = () => (
<StaticQuery
query={graphql`
query {
placeholderImage: file(relativePath: { eq: "apple-iphone-8-plus-0.jpg" }) {
childImageSharp {
fluid(maxWidth: 300) {
...GatsbyImageSharpFluid
}
}
}
}
`}
render={data => <Img fluid={data.placeholderImage.childImageSharp.fluid} />}
/>
)
export default Iphone8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment