fix(CssManager): Make CssManager a singleton and export the shared instance via getSingleton; update tests and dependencies
This commit is contained in:
24
test/test.chromium.ts
Normal file
24
test/test.chromium.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import * as deesElement from '../ts/index.js';
|
||||
|
||||
tap.test('should create a static element', async () => {
|
||||
@deesElement.customElement('my-button')
|
||||
class MyButton extends deesElement.DeesElement {
|
||||
// STATIC
|
||||
public static styles = [
|
||||
deesElement.cssManager.defaultStyles,
|
||||
deesElement.css`
|
||||
.buttonClass {
|
||||
background: ${deesElement.cssManager.bdTheme('blue', 'black')};
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
// INSTANCE
|
||||
render() {
|
||||
return deesElement.html`<div class="buttonClass">My Button</div>`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tap.start();
|
||||
Reference in New Issue
Block a user