Skip to content

Commit 79b3533

Browse files
committed
refactor: delete toasts
1 parent 82c3d69 commit 79b3533

3 files changed

Lines changed: 0 additions & 323 deletions

File tree

assets/js/odyssey.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,6 @@ const Hooks = {
2121
})
2222
}
2323
}
24-
},
25-
ToastHook: {
26-
mounted () {
27-
setTimeout(() => {
28-
this.hideToast()
29-
}, 3000)
30-
31-
const closeButton = this.el.querySelector('[data-close-toast]')
32-
if (closeButton) {
33-
closeButton.addEventListener('click', e => {
34-
e.preventDefault()
35-
this.hideToast()
36-
})
37-
}
38-
},
39-
40-
hideToast () {
41-
const element = this.el
42-
if (element) {
43-
element.style.opacity = '0'
44-
element.style.transform = 'translateX(100%)'
45-
element.style.transition = 'all 0.3s ease-in-out'
46-
47-
setTimeout(() => {
48-
element.remove()
49-
}, 300)
50-
}
51-
}
5224
}
5325
}
5426

lib/peek_app_sdk/ui/odyssey/toasts.ex

Lines changed: 0 additions & 112 deletions
This file was deleted.

test/peek_app_sdk/ui/odyssey/toasts_test.exs

Lines changed: 0 additions & 183 deletions
This file was deleted.

0 commit comments

Comments
 (0)