dioxus/examples/custom_assets.rs

17 lines
333 B
Rust
Raw Normal View History

2022-01-27 16:36:17 -05:00
use dioxus::prelude::*;
fn main() {
dioxus_desktop::launch(app);
2022-01-27 16:36:17 -05:00
}
fn app(cx: Scope) -> Element {
cx.render(rsx! {
div {
p {
"This should show an image:"
}
img { src: mg!(image("examples/assets/logo.png").format(ImageType::Avif)).to_string() }
2022-01-27 16:36:17 -05:00
}
})
}