pub struct FileUploadProps {
pub class: Class,
pub label_class: Class,
pub input_class: Class,
pub color: SharedString,
pub size: SharedString,
pub fullwidth: bool,
pub label: SharedString,
pub icon: Option<Element>,
pub on_change: Option<EventHandler<Vec<NamedFile>>>,
/* private fields */
}Expand description
The FileUpload properties struct for the configuration of the component.
Fields§
§class: ClassThe class attribute for the component.
label_class: ClassA class to apply to the label element.
input_class: ClassA class to apply to the label element.
color: SharedStringThe color of the button: primary | link | info | success | warning | danger.
size: SharedStringThe size of the button: small | normal | medium | large.
fullwidth: boolA flag to determine whether the control is fullwidth or not.
label: SharedStringThe label content.
icon: Option<Element>An optional upload icon.
on_change: Option<EventHandler<Vec<NamedFile>>>An event handler to be called when the files are selected.
Implementations§
Source§impl FileUploadProps
impl FileUploadProps
Sourcepub fn builder() -> FileUploadPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FileUploadPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building FileUploadProps.
On the builder, call .class(...)(optional), .label_class(...)(optional), .input_class(...)(optional), .color(...)(optional), .size(...)(optional), .fullwidth(...)(optional), .label(...), .icon(...)(optional), .on_change(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FileUploadProps.
Trait Implementations§
Source§impl Clone for FileUploadProps
impl Clone for FileUploadProps
Source§fn clone(&self) -> FileUploadProps
fn clone(&self) -> FileUploadProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more