systemquery/src/static/js/ui/forkawesome_emel.mjs
Starbeamrainbowlabs ae1b46097e
client: start work on UI plumbing, but it's far from finished....
UI code is always impossible to keep nice and neat....  * sighs *
2022-02-27 02:06:33 +00:00

11 lines
323 B
JavaScript

"use strict";
export default function(def) {
if(typeof def === "string")
return `span.fa.fa-${def}`;
if(def instanceof Array)
return def.map(el, i => `span.fa.fa-${el}.fa-stack-${def.length-i}x`).join(`+`);
throw new Error(`Error: Expected def of type string or Array, but got variable of type ${typeof def}`);
}