1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-15 16: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,11 +1,18 @@
import { appContext } from '../core/AppContext'
import styles from './LoginForm.css?inline'
export class LoginForm extends HTMLElement {
private static styleSheet = new CSSStyleSheet()
private shadow: ShadowRoot
static {
this.styleSheet.replaceSync(styles)
}
constructor() {
super()
this.shadow = this.attachShadow({ mode: 'open' })
this.shadow.adoptedStyleSheets = [LoginForm.styleSheet]
}
connectedCallback() {
@@ -15,10 +22,6 @@ export class LoginForm extends HTMLElement {
render() {
this.shadow.innerHTML = `
<link rel="stylesheet" href="${new URL(
'./LoginForm.css',
import.meta.url
)}">
<h1>SASjs Tests</h1>
<form id="login-form">
<label for="username">Username</label>