Last active
October 13, 2020 23:00
-
-
Save buddyeorl/c78cd9e68a27bad7530dcff818624934 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 CodeGist from '../PathToCodeGist; | |
//CodeGist props: | |
//url:string //<-- represents the Github gist url | |
//CodeGist accept a children component as a prop, so you can wrap a label or any component you want to render before | |
// the Gist | |
const Example=()=>{ | |
return( | |
<React.Fragment> | |
<CodeGist url={"https://gist.github.com/buddyeorl/c78cd9e68a27bad7530dcff818624934.js"}> | |
<h1> This is an optional component to be rendered before the code </h1> | |
</CodeGist> | |
</React.Fragment> | |
)} | |
export default Example; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment