Created
April 30, 2019 16:29
-
-
Save a9kitkumar/1881ce52c260367bac09db5ed34e294e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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