use crate::utils::mount_style::mount_style; use leptos::*; use stylers::style_sheet_str; #[component] pub fn Input( cx: Scope, #[prop(optional, into)] value: MaybeSignal, #[prop(optional)] on_input: Option>, ) -> impl IntoView { let class_name = mount_style("modal", || style_sheet_str!("./src/input/input.css")); let input_ref = create_node_ref::(cx); if let Some(on_input) = on_input { input_ref.on_load(cx, move |input| { input.on(ev::input, move |ev| { on_input.set(event_target_value(&ev)); }); }); } view! { cx, class=class_name,
} }