Last active
December 20, 2017 18:07
-
-
Save devonwesley/a6068cd8b8e3993b93d198be7df37f17 to your computer and use it in GitHub Desktop.
This creates an element from the contract props pass to it.
This file contains hidden or 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
function createContractHash(name, hash, tag, className) { | |
const el = document.createElement(tag) | |
const value = name === 'input' | |
? `<br/><textarea style="width: 100%;">${hash}</textarea>` | |
: hash | |
el.className = className | |
el.innerHTML = `<br/><strong>${name}</strong>: ${value}` | |
return el | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment