diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 2dab5ad..c0d5382 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -17,6 +17,7 @@ palette = "0.7.4" chrono = "0.4.33" cfg-if = "1.0.0" leptos-use = "0.10.10" +send_wrapper = "0.6" [features] default = ["csr"] diff --git a/demo/src/app.rs b/demo/src/app.rs index 21e78bf..16e3485 100644 --- a/demo/src/app.rs +++ b/demo/src/app.rs @@ -50,46 +50,59 @@ fn TheRouter(is_routing: RwSignal) -> impl IntoView { + // // // // // // - // - // - // - // - // - // - // - - - - - - - - - - - - - // - // - // - // - // - // - // - // - // - // - // - // // - // - // - // - // - // - // + { + view! { + + + + + + + + + + + + + + + } + } + { + view! { + + + + + + + + + + + // + + + + + } + } + { + view! { + + // + + + + + + + } + } // // // diff --git a/demo_markdown/docs/upload/mod.md b/demo_markdown/docs/upload/mod.md index b334827..15351f9 100644 --- a/demo_markdown/docs/upload/mod.md +++ b/demo_markdown/docs/upload/mod.md @@ -1,8 +1,10 @@ # Upload ```rust demo +use send_wrapper::SendWrapper; + let message = use_message(); -let custom_request = move |file_list| { +let custom_request = move |file_list: SendWrapper| { message.create( format!("Number of uploaded files: {}", file_list.length()), MessageVariant::Success, @@ -22,8 +24,10 @@ view!{ ### Drag to upload ```rust demo +use send_wrapper::SendWrapper; + let message = use_message(); -let custom_request = move |file_list| { +let custom_request = move |file_list: SendWrapper| { message.create( format!("Number of uploaded files: {}", file_list.length()), MessageVariant::Success, diff --git a/demo_markdown/src/lib.rs b/demo_markdown/src/lib.rs index 8c303fe..4c55683 100644 --- a/demo_markdown/src/lib.rs +++ b/demo_markdown/src/lib.rs @@ -54,26 +54,26 @@ pub fn include_md(_token_stream: proc_macro::TokenStream) -> proc_macro::TokenSt "LayoutMdPage" => "../docs/layout/mod.md", "LoadingBarMdPage" => "../docs/loading_bar/mod.md", // "MessageMdPage" => "../docs/message/mod.md", - "MessageBarMdPage" => "../docs/message_bar/mod.md" - // "PopoverMdPage" => "../docs/popover/mod.md", - // "ProgressBarMdPage" => "../docs/progress_bar/mod.md", - // "RadioMdPage" => "../docs/radio/mod.md", - // "ScrollbarMdPage" => "../docs/scrollbar/mod.md", - // // "SelectMdPage" => "../docs/select/mod.md", - // "SkeletonMdPage" => "../docs/skeleton/mod.md", - // "SliderMdPage" => "../docs/slider/mod.md", - // "SpaceMdPage" => "../docs/space/mod.md", - // "SpinButtonMdPage" => "../docs/spin_button/mod.md", - // "SpinnerMdPage" => "../docs/spinner/mod.md", - // "SwitchMdPage" => "../docs/switch/mod.md", + "MessageBarMdPage" => "../docs/message_bar/mod.md", + "PopoverMdPage" => "../docs/popover/mod.md", + "ProgressBarMdPage" => "../docs/progress_bar/mod.md", + "RadioMdPage" => "../docs/radio/mod.md", + "ScrollbarMdPage" => "../docs/scrollbar/mod.md", + // "SelectMdPage" => "../docs/select/mod.md", + "SkeletonMdPage" => "../docs/skeleton/mod.md", + "SliderMdPage" => "../docs/slider/mod.md", + "SpaceMdPage" => "../docs/space/mod.md", + "SpinButtonMdPage" => "../docs/spin_button/mod.md", + "SpinnerMdPage" => "../docs/spinner/mod.md", + "SwitchMdPage" => "../docs/switch/mod.md" // "TabListMdPage" => "../docs/tab_list/mod.md", // "TableMdPage" => "../docs/table/mod.md", // "TagMdPage" => "../docs/tag/mod.md", // "TextareaMdPage" => "../docs/textarea/mod.md", // "TimePickerMdPage" => "../docs/time_picker/mod.md", // "TextMdPage" => "../docs/text/mod.md", - // "ToastMdPage" => "../docs/toast/mod.md", - // "UploadMdPage" => "../docs/upload/mod.md" + // // "ToastMdPage" => "../docs/toast/mod.md", + // // "UploadMdPage" => "../docs/upload/mod.md" }; let mut fn_list = vec![]; diff --git a/thaw/src/upload/mod.rs b/thaw/src/upload/mod.rs index 145a586..3cdcc8f 100644 --- a/thaw/src/upload/mod.rs +++ b/thaw/src/upload/mod.rs @@ -11,7 +11,7 @@ use thaw_utils::{add_event_listener, mount_style}; pub fn Upload( #[prop(optional, into)] accept: MaybeSignal, #[prop(optional, into)] multiple: MaybeSignal, - #[prop(optional, into)] custom_request: Option, ()>>, + #[prop(optional, into)] custom_request: Option>>, children: Children, ) -> impl IntoView { mount_style("upload", include_str!("./upload.css"));