mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
feat(ui): add new components
This commit adds the following components: - Glyph
This commit is contained in:
parent
8e083d20d2
commit
38ba42575c
28
src/UI/Components/Glyph.js
Normal file
28
src/UI/Components/Glyph.js
Normal 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>
|
||||
`;
|
||||
}
|
||||
});
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user