Add component API to docs (ex: props, events, slots)

This commit is contained in:
venashial
2022-03-16 23:34:56 -07:00
parent 5a5f817e59
commit a0e05115a3
15 changed files with 877 additions and 41 deletions

View File

@@ -10,9 +10,9 @@
let lastScrollTop: number
window.addEventListener('scroll', function () {
let scrollTop = window.pageYOffset || document.documentElement.scrollTop
if (scrollTop > lastScrollTop) {
if (scrollTop > lastScrollTop && headerElement) {
headerElement.style.top = 'calc(var(--header-height) * -1)'
} else {
} else if (headerElement) {
headerElement.style.top = '0'
}
lastScrollTop = scrollTop