1.0.20 • Published 2 months ago

react-embed-gist v1.0.20

Weekly downloads
142
License
MIT
Repository
github
Last release
2 months ago

React Embed Gist

NPM Weekly Downloads GitHub license GitHub last-commit GitHub issues-raw

Simple react component which can embed gist in your react application

How to use

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 />}
   />

Attributes

  • gist - gist you want to display, in a form of :USERNAME/:GIST_ID
  • file - optional, if you want to show just a single file from the gist, you can specify it here
  • wrapperClass - optional, if you want to pass your own class to article wrapping the gist
  • titleClass - optional, if you want to pass your own class to h2 title of the gist
  • contentClass - optional, if you want to pass your own class to section wrapping the content
  • errorClass - optional, if you want to pass your own class to article wrapping the error message
  • loadingClass - optional, if you want to pass your own class to article wrapper which is displayed during loading time
  • loadingFallback - optional, if you want to pass custom loading component which is displayed during loading time
1.0.20

2 months ago

1.0.19

3 months ago

1.0.18

3 months ago

1.0.17

11 months ago

1.0.16

1 year ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago