adjust dropoze border style

This commit is contained in:
Alex Turchyn
2025-05-14 00:54:48 +03:00
committed by Pete Matsyburka
parent 318b65af18
commit 5f44806287
8 changed files with 48 additions and 23 deletions
@@ -165,11 +165,27 @@ export default targetable(class extends HTMLElement {
onDragover (e) {
if (e.dataTransfer?.types?.includes('Files') || this.dataset.targets !== 'dashboard-dropzone.templateCards') {
this.style.backgroundColor = '#F7F3F0'
if (this.classList.contains('before:border-base-300')) {
this.classList.remove('before:border-base-300')
this.classList.add('before:border-base-content/50')
} else if (this.classList.contains('border-base-300')) {
this.classList.remove('border-base-300')
this.classList.add('border-base-content/50')
}
}
}
onDragleave () {
this.style.backgroundColor = null
if (this.classList.contains('before:border-base-content/50')) {
this.classList.remove('before:border-base-content/50')
this.classList.add('before:border-base-300')
} else if (this.classList.contains('border-base-content/50')) {
this.classList.remove('border-base-content/50')
this.classList.add('border-base-300')
}
}
onWindowDragleave = (e) => {