Skip to content

Instantly share code, notes, and snippets.

@mathisonian
Last active August 14, 2016 20:54
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 mathisonian/3c8884966b5900ee020e0ea22b7cca84 to your computer and use it in GitHub Desktop.
Save mathisonian/3c8884966b5900ee020e0ea22b7cca84 to your computer and use it in GitHub Desktop.
hyperterm plugin test
exports.decorateTerm = (Term, { React, notify }) => {
// this library calls require('react') internally
const Spinner = require('react-spinner');
return class extends React.Component {
render () {
const children = [];
children.push(React.createElement(Term, Object.assign({}, this.props, { key: 'key1' })));
children.push(React.createElement(Spinner, {key: 'key2'}));
return React.createElement('div', {style: {width: '100%', height: '100%', position: 'relative'}}, children);
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment