mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 14:29:22 -05:00
7685e99c8b
* dropdown with icon * dropdown demo page * on_select instaed of on_click * code review fixes
34 lines
910 B
Rust
34 lines
910 B
Rust
pub mod class_list;
|
|
mod dom;
|
|
mod event_listener;
|
|
mod hooks;
|
|
mod on_click_outside;
|
|
mod optional_prop;
|
|
mod signals;
|
|
mod throttle;
|
|
mod time;
|
|
|
|
pub use dom::{get_scroll_parent, mount_style};
|
|
pub use event_listener::{
|
|
add_event_listener, add_event_listener_with_bool, EventListenerHandle, IntoEventTarget,
|
|
};
|
|
pub use hooks::{use_click_position, use_lock_html_scroll, use_next_frame, NextFrame};
|
|
pub use on_click_outside::call_on_click_outside;
|
|
pub use optional_prop::OptionalProp;
|
|
pub use signals::{
|
|
create_component_ref, ComponentRef, Model, OptionalMaybeSignal, SignalWatch, StoredMaybeSignal,
|
|
};
|
|
pub use throttle::throttle;
|
|
pub use time::now_date;
|
|
|
|
pub fn with_hydration_off<T>(f: impl FnOnce() -> T) -> T {
|
|
#[cfg(feature = "hydrate")]
|
|
{
|
|
use leptos::leptos_dom::HydrationCtx;
|
|
HydrationCtx::with_hydration_off(f)
|
|
}
|
|
#[cfg(not(feature = "hydrate"))]
|
|
{
|
|
f()
|
|
}
|
|
}
|