Skip to content

Instantly share code, notes, and snippets.

@devonwesley
Last active December 20, 2017 18:07
Show Gist options
  • Save devonwesley/a6068cd8b8e3993b93d198be7df37f17 to your computer and use it in GitHub Desktop.
Save devonwesley/a6068cd8b8e3993b93d198be7df37f17 to your computer and use it in GitHub Desktop.
This creates an element from the contract props pass to it.
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