From 6ac702f3743662e05d6a81077ee78bb14afa38b5 Mon Sep 17 00:00:00 2001 From: Florian Necas Date: Thu, 4 Apr 2024 11:51:52 +0200 Subject: [PATCH] feat: update header to set stylesheet for whole app --- js/plugins/Header.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/plugins/Header.jsx b/js/plugins/Header.jsx index 5300568a5..d9b8cfd92 100644 --- a/js/plugins/Header.jsx +++ b/js/plugins/Header.jsx @@ -31,6 +31,13 @@ export const Header = ({url = "/header/", page = "mapstore", height = 90, ignore header.setAttribute("logo-url", logoUrl); header.setAttribute("stylesheet", stylesheet); headerScript.src = script; + if (stylesheet) { + const link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("type", "text/css"); + link.setAttribute("href", stylesheet); + document.head.appendChild(link); + } if (container) { container.style.top = height + "px";