kontent-ai / gatsby-packages

Monorepo with Gatsby Kontent packages.
https://www.gatsbyjs.org/plugins/?=%40kentico%2Fkontent-
MIT License
33 stars 24 forks source link

export getGatsbyImageData #210

Closed IvanKiral closed 2 years ago

IvanKiral commented 2 years ago

Motivation

Which issue does this fix? Fixes #207

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

Checklist

How to test

If manual testing is required, what are the steps?

netlify[bot] commented 2 years ago

Deploy Preview for kontent-gatsby-example-dsg-ssr ready!

Name Link
Latest commit 789fb885f9ce5690a16ffc683bc89d20c10885d2
Latest deploy log https://app.netlify.com/sites/kontent-gatsby-example-dsg-ssr/deploys/62bac05c603f690009dc9016
Deploy Preview https://deploy-preview-210--kontent-gatsby-example-dsg-ssr.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Simply007 commented 2 years ago

It would be great to have a section in the README: https://github.com/Kentico/kontent-gatsby-packages/tree/master/packages/gatsby-kontent-components#image-element-component

const data = getGatsbyImageData({ image: images[0] });

return (
<div>
    {/* .... */}
    <pre>{JSON.stringify(data, undefined, 2)}</pre>
    {/* .... */}
</div>
);

What do you think?