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<VNode>,
pub on_change: Option<EventHandler<Vec<NamedFile>>>,
/* private fields */
}
Expand description
The FileUpload
properties struct for the configuration of the component.
Fields§
§class: Class
The class attribute for the component.
label_class: Class
A class to apply to the label
element.
input_class: Class
A class to apply to the label
element.
color: SharedString
A flag to determine whether the control is fullwidth or not.
The color of the button: primary
| link
| info
| success
| warning
| danger
.
size: SharedString
The size of the button: small
| normal
| medium
| large
.
fullwidth: bool
§label: SharedString
The label content.
icon: Option<VNode>
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), .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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more