1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-13 15:10:06 +00:00

fix(sasjs-tests): construct stylesheets

This commit is contained in:
mulahasanovic
2025-11-18 17:26:24 +01:00
parent 6f73011bc1
commit 07e4ba54f3
5 changed files with 38 additions and 23 deletions

View File

@@ -1,13 +1,20 @@
import { appContext } from '../core/AppContext'
import type { SASjsRequest } from '@sasjs/adapter'
import { appContext } from '../core/AppContext'
import styles from './RequestsModal.css?inline'
export class RequestsModal extends HTMLElement {
private static styleSheet = new CSSStyleSheet()
private shadow: ShadowRoot
private dialog: HTMLDialogElement | null = null
static {
this.styleSheet.replaceSync(styles)
}
constructor() {
super()
this.shadow = this.attachShadow({ mode: 'open' })
this.shadow.adoptedStyleSheets = [RequestsModal.styleSheet]
}
connectedCallback() {
@@ -17,10 +24,6 @@ export class RequestsModal extends HTMLElement {
render() {
this.shadow.innerHTML = `
<link rel="stylesheet" href="${new URL(
'./RequestsModal.css',
import.meta.url
)}">
<dialog id="requests-dialog">
<div class="modal-header">
<h2 id="modal-title"></h2>