fix(core): update
This commit is contained in:
1
ts_web/elements/index.ts
Normal file
1
ts_web/elements/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './uptimelink-webwidget';
|
54
ts_web/elements/uptimelink-webwidget.ts
Normal file
54
ts_web/elements/uptimelink-webwidget.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
@customElement('uptimelink-webwidget')
|
||||
export class UptimelinkWebwidget extends LitElement {
|
||||
public static demo = () => html`
|
||||
<uptimelink-webwidget projectSlug="uptime.link"></uptimelink-webwidget>
|
||||
`;
|
||||
|
||||
@property()
|
||||
public projectSlug: string;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
domtools.DomTools.setupDomTools();
|
||||
}
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
display: grid;
|
||||
grid-template-columns: 26px auto;
|
||||
font-family: Roboto;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
box-sizing: border-box;
|
||||
width: 150px;
|
||||
border-radius: 20px;
|
||||
height: 30px;
|
||||
background: #111;
|
||||
padding: 5px;
|
||||
color: #CCC;
|
||||
cursor: pointer;
|
||||
}
|
||||
.statusindicator {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background: #66BB6A;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.statustext {
|
||||
padding-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<div class="mainbox">
|
||||
<div class="statusindicator"></div>
|
||||
<div class="statustext">All systems are up!</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
1
ts_web/index.ts
Normal file
1
ts_web/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './elements/index';
|
16
ts_web/tsconfig.json
Normal file
16
ts_web/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2017",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["es2017", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"noUnusedLocals": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"outDir": "dist/",
|
||||
"skipLibCheck": true,
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user