fix(core): update

This commit is contained in:
Philipp Kunz 2023-01-11 20:52:37 +01:00
parent 884f9725b5
commit 89fd8b5080
2 changed files with 10 additions and 3 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@designestate/dees-catalog',
version: '1.0.130',
version: '1.0.131',
description: 'website for lossless.com'
}

View File

@ -83,7 +83,7 @@ declare global {
export class DeesIcon extends DeesElement {
public static demo = () => html`
<dees-icon iconName="visibility"></dees-icon>
<div style="background: #fff; padding: 10px; font-size: 24px">
<div style="background: #fff; padding: 10px; font-size: 30px">
<dees-icon iconFA="messageSolid"></dees-icon>
<dees-icon iconFA="sun"></dees-icon>
<dees-icon iconFA="sunSolid"></dees-icon>
@ -95,7 +95,7 @@ export class DeesIcon extends DeesElement {
public iconFA: keyof typeof faIcons;
@property()
public iconSize: number = 20;
public iconSize: number;
constructor() {
super();
@ -108,6 +108,9 @@ export class DeesIcon extends DeesElement {
:host {
display: block;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
}
`,
];
@ -117,6 +120,7 @@ export class DeesIcon extends DeesElement {
${domtools.elementBasic.styles}
<style>
#iconContainer svg {
display: block;
height: ${this.iconSize}px;
}
</style>
@ -125,6 +129,9 @@ export class DeesIcon extends DeesElement {
}
public async firstUpdated() {
if (!this.iconSize) {
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
}
if (this.iconFA) {
this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA
? icon(faIcons[this.iconFA]).html[0]