feat(ui): add new components

This commit adds the following components:
- Glyph
This commit is contained in:
KernelDeimos 2024-05-30 16:03:03 -04:00
parent 8e083d20d2
commit 38ba42575c
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
import { Component } from "../../util/Component.js";
export default def(class Glyph extends Component {
static ID = 'ui.component.Glyph';
static PROPERTIES = {
size: {
value: 24,
},
codepoint: {
value: '✅',
},
}
static CSS = `
div {
text-align: center;
}
`;
create_template ({ template }) {
template.innerHTML = /*html*/`
<div style="font-size: ${this.get('size')}px;">
${this.get('codepoint')}
</div>
`;
}
});

View File

@ -3,6 +3,7 @@ logger.info('start -> async initialization');
import './util/TeePromise.js';
import './util/Component.js';
import './UI/Components/Glyph.js';
logger.info('end -> async initialization');
globalThis.init_promise.resolve();