Skip to content

Commit

Permalink
edit demo
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed Jul 12, 2023
1 parent 5a15250 commit 78daf15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions demo/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { useFixedHeader } from '../src/useFixedHeader'
const headerRef = ref<HTMLElement | null>(null)
useFixedHeader(headerRef, {
leaveDelta: 0.5,
enterDelta: 0.5,
})
useFixedHeader(headerRef)
</script>

<template>
Expand Down
8 changes: 3 additions & 5 deletions demo/WithContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const headerRef = ref<HTMLElement | null>(null)
useFixedHeader(headerRef, {
root: containerRef,
leaveDelta: 0.5,
enterDelta: 0.5,
})
</script>

Expand All @@ -24,7 +22,7 @@ useFixedHeader(headerRef, {
<a
target="_blank"
class="Header_Button"
href="https://github.com/smastrom/vue-use-fixed-header/blob/main/demo/Container.vue"
href="https://github.com/smastrom/vue-use-fixed-header/blob/main/demo/WithContainer.vue"
>
View Code
</a>
Expand All @@ -47,7 +45,7 @@ useFixedHeader(headerRef, {
}
.Container {
height: 1200px;
height: 1800px;
position: relative;
background-color: var(--WhiteColor);
}
Expand All @@ -67,7 +65,7 @@ useFixedHeader(headerRef, {
border-radius: 1rem;
}
.Header .Global_Logo {
.Header_Container .Global_Logo {
color: var(--WhiteColor);
}
Expand Down

0 comments on commit 78daf15

Please sign in to comment.