Skip to content

Instantly share code, notes, and snippets.

@buddyeorl
Last active October 14, 2020 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buddyeorl/0d01220bae0b2c0d76c81ee6b1b64154 to your computer and use it in GitHub Desktop.
Save buddyeorl/0d01220bae0b2c0d76c81ee6b1b64154 to your computer and use it in GitHub Desktop.
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