Components / AttachmentStrip
AttachmentStrip
Files about to go with a message, with size, how to send each one and a way to take it out.
Example
The component itself, running in WebAssembly, beside its code in a playground. Try it.
Code
use ravenrs::prelude::*;
fn attachment_strip() -> impl View {
// The app holds the list, and changes it when told.
AttachmentStrip::new([
Attachment::new("report.pdf").size(120_000),
Attachment::new("beach.jpg").size(2_400_000).icon(IconName::Image).send_as(
["photo", "document"],
0,
|_how| {},
),
])
.on_remove(|_index| {})
.width(420.0)
}