diff options
Diffstat (limited to 'web_src/js/utils.js')
-rw-r--r-- | web_src/js/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/utils.js b/web_src/js/utils.js new file mode 100644 index 0000000000..2effddd685 --- /dev/null +++ b/web_src/js/utils.js @@ -0,0 +1,5 @@ +const { StaticUrlPrefix } = window.config; + +export function svg(name, size) { + return `<svg class="svg ${name}" width="${size}" height="${size}" aria-hidden="true"><use xlink:href="${StaticUrlPrefix}/img/svg/icons.svg#${name}"/></svg>`; +} |