dees-wcctools/ts_web/elements/wcc-defaultelement.ts

38 lines
927 B
TypeScript
Raw Normal View History

2020-05-10 23:14:17 +00:00
import { LitElement, property, html, customElement } from 'lit-element';
import { TemplateResult } from 'lit-html';
2020-05-11 00:36:58 +00:00
@customElement('wcc-defaultelement')
export class WccDefaultElement extends LitElement {
2020-05-24 19:37:43 +00:00
public static demo = () => html`<wcc-defaultelement></wcc-defaultelement>`;
2020-05-11 00:36:58 +00:00
2020-05-10 23:14:17 +00:00
constructor() {
super();
// you have access to all kinds of things through this.
// this.setAttribute('gotIt','true');
}
public render(): TemplateResult {
return html`
<style>
:host {
font-family: 'Roboto', sans-serif;
2020-05-11 00:36:58 +00:00
background: #333;
text-align: center;
padding:30px;
2020-05-10 23:14:17 +00:00
box-shadow: 0px 0px 5px rgba(0,0,0,0.6);
display: block;
box-sizing: border-box;
2020-05-11 00:36:58 +00:00
color: #fff;
font-size: 30px;
2020-05-10 23:14:17 +00:00
}
:host([hidden]) {
display: none;
}
</style>
2020-05-11 00:36:58 +00:00
No Element specified!
2020-05-10 23:14:17 +00:00
`;
}
}