MCPcopy
hub / github.com/json-editor/json-editor / getInfoButton

Method getInfoButton

src/theme.js:104–122  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

102 }
103
104 getInfoButton (text) {
105 const icon = document.createElement('span')
106 icon.innerText = 'ⓘ'
107 icon.classList.add('je-infobutton-icon')
108
109 const tooltip = document.createElement('span')
110 tooltip.classList.add('je-infobutton-tooltip')
111 tooltip.innerText = text
112 icon.onmouseover = () => {
113 tooltip.style.visibility = 'visible'
114 }
115 icon.onmouseleave = () => {
116 tooltip.style.visibility = 'hidden'
117 }
118
119 icon.appendChild(tooltip)
120
121 return icon
122 }
123
124 getFormInputLabel (text, req) {
125 const el = document.createElement('label')

Callers

nothing calls this directly

Calls 1

addMethod · 0.80

Tested by

no test coverage detected