You've already forked AstralRinth
forked from didirus/AstralRinth
Add component API to docs (ex: props, events, slots)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<script lang="ts">
|
||||
const components = ['button', 'pagination', 'link']
|
||||
</script>
|
||||
|
||||
<nav class="sidebar">
|
||||
<div class="section">
|
||||
<span class="section__title">Getting started</span>
|
||||
@@ -8,7 +12,7 @@
|
||||
|
||||
<div class="section">
|
||||
<span class="section__title">Components</span>
|
||||
{#each ['buttons', 'pagination'] as component}
|
||||
{#each components as component}
|
||||
<a href="/components/{component}" class="section__link">{component}</a>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user