dees-element/test/test.browser.ts

25 lines
609 B
TypeScript
Raw Normal View History

2023-08-07 07:19:53 +00:00
import { expect, tap } from '@push.rocks/tapbundle';
2022-03-16 13:48:01 +00:00
import * as deesElement from '../ts/index.js';
2021-03-27 16:52:06 +00:00
tap.test('should create a static element', async () => {
@deesElement.customElement('my-button')
class MyButton extends deesElement.DeesElement {
// STATIC
public static styles = [
2021-12-10 16:01:03 +00:00
deesElement.cssManager.defaultStyles,
2021-03-27 16:52:06 +00:00
deesElement.css`
.buttonClass {
2021-03-28 20:10:51 +00:00
background: ${deesElement.cssManager.bdTheme('blue', 'black')};
2021-03-27 16:52:06 +00:00
}
2022-03-16 14:00:10 +00:00
`,
2021-03-27 16:52:06 +00:00
];
// INSTANCE
render() {
2022-03-16 14:00:10 +00:00
return deesElement.html`<div class="buttonClass">My Button</div>`;
2021-03-27 16:52:06 +00:00
}
}
});
tap.start();