19 lines
368 B
Rust
19 lines
368 B
Rust
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::Ready(sync) = cx.root_node() {
|
|
sync.root_ids.get(0).and_then(|id| id.get())
|
|
} else {
|
|
None
|
|
}
|
|
}
|