Skip to content

Commit b1ce76b

Browse files
committed
new
1 parent 85b7615 commit b1ce76b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

packages/floating-ui-svelte/src/hooks/use-list-navigation.svelte.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ class ListNavigationState {
472472
}
473473

474474
#onNavigate = () => {
475+
console.log("calling on navigate");
475476
this.opts.onNavigate?.(this.#index === -1 ? null : this.#index);
476477
};
477478

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts">
2+
import { useFloating } from "../../../../src/index.js";
3+
4+
const f = useFloating();
5+
</script>
6+
7+
<h1 class="text-5xl font-bold mb-8">New</h1>
8+
<div
9+
class="grid place-items-center border border-slate-400 rounded lg:w-[40rem] h-[20rem] mb-4">
10+
<div bind:this={f.reference}>Reference</div>
11+
<div bind:this={f.floating} style={f.floatingStyles}>Floating</div>
12+
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script lang="ts">
2+
import Main from "../../components/new/main.svelte";
3+
</script>
4+
5+
<Main />

0 commit comments

Comments
 (0)