Simple react component which can embed gist in your react application
Just import as dependency in your file and pass gist as parameter, for example:
import ReactEmbedGist from 'react-embed-gist';
// Only required attribute is gist
<ReactEmbedGist
gist="msaracevic/5d757e2fc72482a9a4a439969500c2eb"
wrapperClass="gist__bash"
loadingClass="loading__screen"
titleClass="gist__title"
errorClass="gist__error"
contentClass="gist__content"
file=".bash_profile.sh"
loadingFallback={<Loading />}
/>
gist
- gist you want to display, in a form of :USERNAME/:GIST_IDfile
- optional, if you want to show just a single file from the gist, you can specify it herewrapperClass
- optional, if you want to pass your own class toarticle
wrapping the gisttitleClass
- optional, if you want to pass your own class toh2
title of the gistcontentClass
- optional, if you want to pass your own class tosection
wrapping the contenterrorClass
- optional, if you want to pass your own class toarticle
wrapping the error messageloadingClass
- optional, if you want to pass your own class toarticle
wrapper which is displayed during loading timeloadingFallback
- optional, if you want to pass custom loading component which is displayed during loading time