This commit is contained in:
Evan Almloff committed 2022-12-07 20:28:01 -06:00
1 parent cdb1e76f6f
commit 029255c7ac
19 files changed
+1562 -27

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
mod button;
mod checkbox;
mod input;
mod number;
mod password;
mod slider;
mod textbox;
use dioxus_core::{ElementId, RenderReturn, Scope};
pub use input::*;
pub(crate) fn get_root_id<T>(cx: Scope<T>) -> Option<ElementId> {
if let RenderReturn::Sync(Ok(sync)) = cx.root_node() {
sync.root_ids.get(0).map(|id| id.get())
} else {
None
}
}