mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-01-23 09:09:21 -05:00
parent
fb1ac55ac7
commit
e31709ba84
15 changed files with 24 additions and 2 deletions
|
@ -13,7 +13,7 @@ repository = "https://github.com/Synphonyte/leptos-use"
|
||||||
homepage = "https://leptos-use.rs"
|
homepage = "https://leptos-use.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
leptos = "0.5.0-beta2"
|
leptos = "0.5.0-rc1"
|
||||||
wasm-bindgen = "0.2"
|
wasm-bindgen = "0.2"
|
||||||
js-sys = "0.3"
|
js-sys = "0.3"
|
||||||
default-struct-builder = "0.5"
|
default-struct-builder = "0.5"
|
||||||
|
|
|
@ -5,7 +5,7 @@ use leptos_use::signal_throttled;
|
||||||
#[component]
|
#[component]
|
||||||
fn Demo() -> impl IntoView {
|
fn Demo() -> impl IntoView {
|
||||||
let (input, set_input) = create_signal("".to_string());
|
let (input, set_input) = create_signal("".to_string());
|
||||||
let throttled = signal_throttled(input, 1000.0);
|
let throttled: Signal<String> = signal_throttled(input, 1000.0);
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
use axum::{routing::post, Router};
|
use axum::{routing::post, Router};
|
||||||
|
use leptos::logging::log;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_axum::{generate_route_list, LeptosRoutes};
|
use leptos_axum::{generate_route_list, LeptosRoutes};
|
||||||
use start_axum::app::*;
|
use start_axum::app::*;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use leptos::ev::{click, keydown};
|
use leptos::ev::{click, keydown};
|
||||||
use leptos::html::A;
|
use leptos::html::A;
|
||||||
|
use leptos::logging::log;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_use::use_event_listener;
|
use leptos_use::use_event_listener;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use leptos::html::Div;
|
use leptos::html::Div;
|
||||||
|
use leptos::logging::log;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use leptos_use::docs::{demo_or_body, BooleanDisplay};
|
use leptos_use::docs::{demo_or_body, BooleanDisplay};
|
||||||
use leptos_use::{use_scroll_with_options, ScrollBehavior, UseScrollOptions, UseScrollReturn};
|
use leptos_use::{use_scroll_with_options, ScrollBehavior, UseScrollOptions, UseScrollReturn};
|
||||||
|
|
|
@ -25,6 +25,7 @@ static IOS_WORKAROUND: RwLock<bool> = RwLock::new(false);
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
/// # use leptos::ev::resize;
|
/// # use leptos::ev::resize;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos::html::Div;
|
/// # use leptos::html::Div;
|
||||||
/// # use leptos_use::on_click_outside;
|
/// # use leptos_use::on_click_outside;
|
||||||
/// #
|
/// #
|
||||||
|
|
|
@ -17,6 +17,7 @@ use web_sys::AddEventListenerOptions;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// use leptos_use::use_active_element;
|
/// use leptos_use::use_active_element;
|
||||||
/// #
|
/// #
|
||||||
/// # #[component]
|
/// # #[component]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use crate::use_media_query;
|
use crate::use_media_query;
|
||||||
|
use leptos::logging::error;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use paste::paste;
|
use paste::paste;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
|
@ -12,6 +12,7 @@ use leptos::*;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// use leptos_use::{use_cycle_list, UseCycleListReturn};
|
/// use leptos_use::{use_cycle_list, UseCycleListReturn};
|
||||||
/// #
|
/// #
|
||||||
/// # #[component]
|
/// # #[component]
|
||||||
|
|
|
@ -16,6 +16,7 @@ use wasm_bindgen::JsCast;
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
/// # use leptos::ev::visibilitychange;
|
/// # use leptos::ev::visibilitychange;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::use_event_listener;
|
/// # use leptos_use::use_event_listener;
|
||||||
/// #
|
/// #
|
||||||
/// # #[component]
|
/// # #[component]
|
||||||
|
@ -33,6 +34,7 @@ use wasm_bindgen::JsCast;
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
/// # use leptos::ev::click;
|
/// # use leptos::ev::click;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::use_event_listener;
|
/// # use leptos_use::use_event_listener;
|
||||||
/// #
|
/// #
|
||||||
/// # #[component]
|
/// # #[component]
|
||||||
|
@ -61,6 +63,7 @@ use wasm_bindgen::JsCast;
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
/// # use leptos::ev::keydown;
|
/// # use leptos::ev::keydown;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use web_sys::KeyboardEvent;
|
/// # use web_sys::KeyboardEvent;
|
||||||
/// # use leptos_use::use_event_listener;
|
/// # use leptos_use::use_event_listener;
|
||||||
/// #
|
/// #
|
||||||
|
|
|
@ -12,6 +12,7 @@ use leptos::*;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::watch_debounced;
|
/// # use leptos_use::watch_debounced;
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -35,6 +36,7 @@ use leptos::*;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{watch_debounced_with_options, WatchDebouncedOptions};
|
/// # use leptos_use::{watch_debounced_with_options, WatchDebouncedOptions};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
|
|
@ -11,6 +11,7 @@ use leptos::*;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{watch_pausable, WatchPausableReturn};
|
/// # use leptos_use::{watch_pausable, WatchPausableReturn};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
|
|
@ -11,6 +11,7 @@ use default_struct_builder::DefaultBuilder;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::watch_throttled;
|
/// # use leptos_use::watch_throttled;
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -34,6 +35,7 @@ use default_struct_builder::DefaultBuilder;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{watch_throttled_with_options, WatchThrottledOptions};
|
/// # use leptos_use::{watch_throttled_with_options, WatchThrottledOptions};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
|
|
@ -17,6 +17,7 @@ use std::rc::Rc;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{watch_with_options, WatchOptions};
|
/// # use leptos_use::{watch_with_options, WatchOptions};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -41,6 +42,7 @@ use std::rc::Rc;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{watch_with_options, WatchOptions};
|
/// # use leptos_use::{watch_with_options, WatchOptions};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -59,6 +61,7 @@ use std::rc::Rc;
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{watch_with_options, WatchOptions};
|
/// # use leptos_use::{watch_with_options, WatchOptions};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
|
|
@ -6,6 +6,7 @@ use crate::{watch_with_options, WatchOptions};
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::whenever;
|
/// # use leptos_use::whenever;
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -23,6 +24,7 @@ use crate::{watch_with_options, WatchOptions};
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::whenever;
|
/// # use leptos_use::whenever;
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -41,6 +43,7 @@ use crate::{watch_with_options, WatchOptions};
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::whenever;
|
/// # use leptos_use::whenever;
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
@ -60,6 +63,7 @@ use crate::{watch_with_options, WatchOptions};
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use leptos::*;
|
/// # use leptos::*;
|
||||||
|
/// # use leptos::logging::log;
|
||||||
/// # use leptos_use::{WatchOptions, whenever_with_options};
|
/// # use leptos_use::{WatchOptions, whenever_with_options};
|
||||||
/// #
|
/// #
|
||||||
/// # pub fn Demo() -> impl IntoView {
|
/// # pub fn Demo() -> impl IntoView {
|
||||||
|
|
Loading…
Add table
Reference in a new issue