Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
916ba68c94 | |||
46fc396772 | |||
0e77baf600 | |||
89fd8b5080 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.130",
|
"version": "1.0.132",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "website for lossless.com",
|
"description": "website for lossless.com",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.130',
|
version: '1.0.132',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ import {
|
|||||||
faUsers as faUsersSolid,
|
faUsers as faUsersSolid,
|
||||||
faShare as faShareSolid,
|
faShare as faShareSolid,
|
||||||
faSun as faSunSolid,
|
faSun as faSunSolid,
|
||||||
|
faXmark as faXmarkSolid,
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
export const faIcons = {
|
export const faIcons = {
|
||||||
@ -61,6 +62,8 @@ export const faIcons = {
|
|||||||
shareSolid: faShareSolid,
|
shareSolid: faShareSolid,
|
||||||
sun: faSunRegular,
|
sun: faSunRegular,
|
||||||
sunSolid: faSunSolid,
|
sunSolid: faSunSolid,
|
||||||
|
xmark: faXmarkSolid,
|
||||||
|
xmarkSolid: faXmarkSolid,
|
||||||
// brands
|
// brands
|
||||||
facebook: faFacebook,
|
facebook: faFacebook,
|
||||||
google: faGoogle,
|
google: faGoogle,
|
||||||
@ -83,7 +86,7 @@ declare global {
|
|||||||
export class DeesIcon extends DeesElement {
|
export class DeesIcon extends DeesElement {
|
||||||
public static demo = () => html`
|
public static demo = () => html`
|
||||||
<dees-icon iconName="visibility"></dees-icon>
|
<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="messageSolid"></dees-icon>
|
||||||
<dees-icon iconFA="sun"></dees-icon>
|
<dees-icon iconFA="sun"></dees-icon>
|
||||||
<dees-icon iconFA="sunSolid"></dees-icon>
|
<dees-icon iconFA="sunSolid"></dees-icon>
|
||||||
@ -95,7 +98,7 @@ export class DeesIcon extends DeesElement {
|
|||||||
public iconFA: keyof typeof faIcons;
|
public iconFA: keyof typeof faIcons;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
public iconSize: number = 20;
|
public iconSize: number;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -108,6 +111,9 @@ export class DeesIcon extends DeesElement {
|
|||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
@ -117,6 +123,7 @@ export class DeesIcon extends DeesElement {
|
|||||||
${domtools.elementBasic.styles}
|
${domtools.elementBasic.styles}
|
||||||
<style>
|
<style>
|
||||||
#iconContainer svg {
|
#iconContainer svg {
|
||||||
|
display: block;
|
||||||
height: ${this.iconSize}px;
|
height: ${this.iconSize}px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -125,6 +132,9 @@ export class DeesIcon extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async firstUpdated() {
|
||||||
|
if (!this.iconSize) {
|
||||||
|
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
|
||||||
|
}
|
||||||
if (this.iconFA) {
|
if (this.iconFA) {
|
||||||
this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA
|
this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA
|
||||||
? icon(faIcons[this.iconFA]).html[0]
|
? icon(faIcons[this.iconFA]).html[0]
|
||||||
|
Reference in New Issue
Block a user