Last active
October 14, 2020 03:22
-
-
Save buddyeorl/0d01220bae0b2c0d76c81ee6b1b64154 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 ActivateOnClick from '../PathToActivateOnClick; | |
//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> | |
<ActivateOnClick> | |
<p> I'm a wrapped component, the button add/remove me from the DOM </p> | |
</ActivateOnClick> | |
</React.Fragment> | |
)} | |
export default Example; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment