refactor(Elife): Use Thema utils to add SVG markup
@@ -43,15 +43,17 @@ const buildSharer = (
url: string,
wrapper: Element
): void => {
- const link = create('a', {
+ const link = create(
+ 'a',
+ {
href: url,
class: 'social-sharer-link',
'aria-label': description,
target: '_blank',
rel: 'noopener noreferrer',
- })
- // Using DOM method innerHTML, not a Thema util method, as a way to get inline SVG text incorporated as an Element
- link.innerHTML = imageMarkup
+ },
+ create(imageMarkup)
+ )
append(wrapper, link)
}
