Skip to content

Commit 724643e

Browse files
committed
feat: create_element_intrinsic
1 parent a236564 commit 724643e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/element.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,17 @@ crate::macro_import::wasm_bindgen_react! {
3737
props: &JsValue,
3838
children: &js_sys::Array,
3939
) -> Element;
40+
41+
#[wasm_bindgen(js_namespace = React, js_name = createElement)]
42+
pub fn create_element_intrinsic_no_props(element_type: &str) -> Element;
43+
44+
#[wasm_bindgen(js_namespace = React, js_name = createElement)]
45+
pub fn create_element_intrinsic_no_children(element_type: &str, props: &JsValue) -> Element;
46+
47+
#[wasm_bindgen(variadic, js_namespace = React, js_name = createElement)]
48+
pub fn create_element_intrinsic(
49+
element_type: &str,
50+
props: &JsValue,
51+
children: &js_sys::Array,
52+
) -> Element;
4053
}

0 commit comments

Comments
 (0)