Skip to content

Commit

Permalink
feat: use safe teleport dep
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed May 23, 2023
1 parent d51be19 commit 3e1f4c6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/layout/navigation/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</div>

<!-- Actions -->
<div
<TeleportTarget
id="navbar-actions"
class="absolute inset-y-0 right-0 flex flex-row-reverse items-center pr-2"
>
Expand All @@ -84,7 +84,7 @@
class="hover:hover-text-util h-6 w-6 text-base-content-highlight"
/>
</button>
</div>
</TeleportTarget>
</div>
</div>
</nav>
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@
"tailwindcss": "^3.3.2",
"tippy.js": "^6.3.7",
"vue-matomo": "^4.2.0",
"vue-safe-teleport": "^0.1.2",
"vue-sonner": "^0.3.2",
"vue-tippy": "^6.2.0",
"vuetify": "^3.3.0"
},
"devDependencies": {
"@types/lodash-es": "^4.17.7",
"autoprefixer": "^10.4.14",
"jest": "^29.5.0",
"postcss": "^8.4.23",
Expand Down
5 changes: 3 additions & 2 deletions pages/posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@

<template>
<!-- Search -->
<teleport to="#navbar-actions">
<SafeTeleport to="#navbar-actions">
<!-- TODO: Add badge with tag/filter count -->
<button
class="focus-visible:focus-util hover:hover-bg-util rounded-lg px-2 py-1.5"
type="button"
Expand All @@ -147,7 +148,7 @@
class="hover:hover-text-util h-6 w-6 text-base-content-highlight"
/>
</button>
</teleport>
</SafeTeleport>

<!-- Search menu -->
<SearchMenu
Expand Down
24 changes: 24 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e1f4c6

Please sign in to comment.