fix(core): update
This commit is contained in:
@ -32,6 +32,11 @@ export class DeesSpinner extends DeesElement {
|
||||
})
|
||||
public size = 20;
|
||||
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
public bnw: boolean = false;
|
||||
|
||||
@property()
|
||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||
|
||||
@ -61,12 +66,14 @@ export class DeesSpinner extends DeesElement {
|
||||
}
|
||||
|
||||
#loading.success {
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
animation: none;
|
||||
-webkit-animation: none;
|
||||
}
|
||||
|
||||
#loading.error {
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
animation: none;
|
||||
-webkit-animation: none;
|
||||
@ -88,14 +95,6 @@ export class DeesSpinner extends DeesElement {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#loading.success dees-icon {
|
||||
color: #8bc34a;
|
||||
}
|
||||
|
||||
#loading.error dees-icon {
|
||||
color: #e64a19;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
@ -107,21 +106,22 @@ export class DeesSpinner extends DeesElement {
|
||||
height: ${this.size}px;
|
||||
}
|
||||
#loading.success {
|
||||
border: ${Math.round(this.size * 0.08)}px solid ${cssManager.bdTheme(`#8bc34a`, '#8bc34a')}
|
||||
color: ${cssManager.bdTheme(this.bnw ? '#333': `#8bc34a`, this.bnw ? '#fff' : `#8bc34a`)};
|
||||
|
||||
}
|
||||
#loading.error {
|
||||
border: ${Math.round(this.size * 0.1)}px solid ${cssManager.bdTheme(`#e64a19`, '#e64a19')}
|
||||
color: ${cssManager.bdTheme(this.bnw ? '#333': `#e64a19`, this.bnw ? '#fff' : `#e64a19`)};
|
||||
}
|
||||
dees-icon {
|
||||
font-size: ${Math.round(this.size * 0.6)}px;
|
||||
font-size: ${this.size}px;
|
||||
}
|
||||
</style>
|
||||
<div class="${this.status}" id="loading">
|
||||
${(() => {
|
||||
if (this.status === 'success') {
|
||||
return html`<dees-icon style="transform: translateX(1%) translateY(3%);" .iconFA=${'check' as any}></dees-icon>`;
|
||||
return html`<dees-icon style="transform: translateX(1%) translateY(3%);" .iconFA=${'circleCheck' as any}></dees-icon>`;
|
||||
} else if (this.status === 'error') {
|
||||
return html`<dees-icon .iconFA=${'xmark' as any}></dees-icon>`;
|
||||
return html`<dees-icon .iconFA=${'circleXmark' as any}></dees-icon>`;
|
||||
}
|
||||
})()}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user