pinafore/src/routes/_utils/loadCSS.js
Nolan Lawson 098a20db49
feat: add full emoji picker using emoji-mart (#836)
* feat: add full emoji picker using emoji-mart

Fixes #4

* use a sailboat as the default emoji in the emoji picker

* fix tests

* fix lint
2018-12-18 00:43:51 -08:00

13 lines
265 B
JavaScript

export function loadCSS (href) {
let existingLink = document.querySelector(`link[href="${href}"]`)
if (existingLink) {
return
}
let link = document.createElement('link')
link.rel = 'stylesheet'
link.href = href
document.head.appendChild(link)
}