mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
407 B
19 lines
407 B
export default class extends HTMLElement {
|
|
setValue (value) {
|
|
const { fieldType } = this.dataset
|
|
|
|
if (fieldType === 'signature') {
|
|
[...this.children].forEach(e => e.remove())
|
|
|
|
const img = document.createElement('img')
|
|
|
|
img.classList.add('w-full', 'h-full', 'object-contain')
|
|
img.src = value.url
|
|
|
|
this.append(img)
|
|
} else {
|
|
this.innerHTML = value
|
|
}
|
|
}
|
|
}
|