diff --git a/src/components/file_drop.rs b/src/components/file_drop.rs index 8580442..e83092f 100644 --- a/src/components/file_drop.rs +++ b/src/components/file_drop.rs @@ -9,9 +9,19 @@ use leptos_use::{UseDropZoneOptions, UseDropZoneReturn, use_drop_zone_with_optio #[component] pub fn FileDrop( - #[prop(into)] name: String, - #[prop(into)] form_id: String, - #[prop()] existing_files: Resource, ServerFnError>>, + /// The name of this input. Used in file organization. + #[prop(into)] + name: String, + /// The ID of the form containing this input. Used in file organization. + #[prop(into)] + form_id: String, + /// The types that a file is allowed to be. Must be specified as the desired file extension (i.e. + /// `.pdf`, `.txt`, etc.) + #[prop(optional)] + allowed_types: Vec, + /// A [`Resource`] that gives the currently uploaded files for this input. + #[prop()] + existing_files: Resource, ServerFnError>>, ) -> impl IntoView { let zone_ref = NodeRef::