@dataforsyningen/designsystem
Advanced tools
Comparing version 4.5.0 to 4.5.2
@@ -28,5 +28,8 @@ // src/js/codeview.js | ||
render() { | ||
const styleTag = document.createElement("style"); | ||
styleTag.innerText = this.styles; | ||
document.head.append(styleTag); | ||
if (!document.head.querySelector(".ds-code-view-style")) { | ||
const styleTag = document.createElement("style"); | ||
styleTag.className = "ds-code-view-style"; | ||
styleTag.innerHTML = this.styles; | ||
document.head.append(styleTag); | ||
} | ||
this.innerHTML = this.template; | ||
@@ -80,5 +83,8 @@ } | ||
render() { | ||
const styleTag = document.createElement("style"); | ||
styleTag.innerText = this.style; | ||
document.head.append(styleTag); | ||
if (!document.head.querySelector(".ds-theme-toggle-style")) { | ||
const styleTag = document.createElement("style"); | ||
styleTag.className = "ds-theme-toggle-style"; | ||
styleTag.innerHTML = this.style; | ||
document.head.append(styleTag); | ||
} | ||
this.innerHTML = ` | ||
@@ -85,0 +91,0 @@ <div class="ds-theme-toggle ds-button-group"> |
{ | ||
"name": "@dataforsyningen/designsystem", | ||
"version": "4.5.0", | ||
"version": "4.5.2", | ||
"description": "Common design system for SDFI with CSS, icons, UI components, and logo images.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -30,5 +30,10 @@ export class CodeView extends HTMLElement { | ||
render() { | ||
const styleTag = document.createElement('style') | ||
styleTag.innerText = this.styles | ||
document.head.append(styleTag) | ||
if (!document.head.querySelector('.ds-code-view-style')) { | ||
const styleTag = document.createElement('style') | ||
styleTag.className = "ds-code-view-style" | ||
styleTag.innerHTML = this.styles | ||
document.head.append(styleTag) | ||
} | ||
this.innerHTML = this.template | ||
@@ -35,0 +40,0 @@ } |
@@ -42,5 +42,9 @@ export class ThemeToggle extends HTMLElement { | ||
render() { | ||
const styleTag = document.createElement('style') | ||
styleTag.innerText = this.style | ||
document.head.append(styleTag) | ||
if (!document.head.querySelector('.ds-theme-toggle-style')) { | ||
const styleTag = document.createElement('style') | ||
styleTag.className = "ds-theme-toggle-style" | ||
styleTag.innerHTML = this.style | ||
document.head.append(styleTag) | ||
} | ||
@@ -47,0 +51,0 @@ this.innerHTML = ` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
655935
2533