Skip to content

Commit

Permalink
Update FocusGuards to Leptos 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Almaju committed Jan 19, 2025
1 parent edb08eb commit c57be01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ members = [
"packages/primitives/leptos/arrow",
"packages/primitives/leptos/aspect-ratio",
"packages/primitives/leptos/direction",
"packages/primitives/leptos/focus-guards",
"packages/primitives/leptos/id",
"packages/primitives/leptos/label",
"packages/primitives/leptos/use-controllable-state",
Expand Down
2 changes: 1 addition & 1 deletion packages/primitives/leptos/focus-guards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ version.workspace = true

[dependencies]
leptos.workspace = true
web-sys.workspace = true
web-sys = { workspace = true, features = ["Document", "NodeList"] }
6 changes: 4 additions & 2 deletions packages/primitives/leptos/focus-guards/src/focus_guards.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::atomic::{AtomicU64, Ordering};

use leptos::*;
use leptos::prelude::*;
use web_sys::{wasm_bindgen::JsCast, Element, HtmlElement};

static COUNT: AtomicU64 = AtomicU64::new(0);
Expand All @@ -9,7 +9,9 @@ static COUNT: AtomicU64 = AtomicU64::new(0);
pub fn FocusGuards(children: ChildrenFn) -> impl IntoView {
use_focus_guards();

children
view! {
{children()}
}
}

pub fn use_focus_guards() {
Expand Down

0 comments on commit c57be01

Please sign in to comment.