Skip to content

Commit 8844a8b

Browse files
committed
feat: use_ref<HtmlElement>
1 parent 27ee5d0 commit 8844a8b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ features = [
4040
"Window",
4141
"Document",
4242
"Element",
43+
"HtmlElement",
4344
]
4445

4546
[dev-dependencies]

src/use_ref/helpers.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,16 @@ define_react_use_ref_helpers! {
2121
use_ref_bool,
2222
use_ref_bool_with,
2323
},
24+
{
25+
value: web_sys::HtmlElement,
26+
object: MutableRefObjectHtmlElment,
27+
use_ref_html_element,
28+
use_ref_html_element_with,
29+
},
30+
{
31+
value: Option<web_sys::HtmlElement>,
32+
object: MutableRefObjectOptionalHtmlElment,
33+
use_ref_optional_html_element,
34+
use_ref_optional_html_element_with,
35+
},
2436
}

0 commit comments

Comments
 (0)