Update examples, add css

This commit is contained in:
Jonathan Kelley committed 2024-02-14 12:33:07 -08:00
1 parent 25d103c1a5
commit bdbae8ccb0
57 files changed
+964 -595

No files matched your search

+9 -3
View File
@@ -1,3 +1,9 @@
//! This example shows how to load in custom assets with the use_asset_handler hook.
//!
//! This hook is currently only available on desktop and allows you to intercept any request made by the webview
//! and respond with your own data. You could use this to load in custom videos, streams, stylesheets, images,
//! or any asset that isn't known at compile time.
use dioxus::desktop::{use_asset_handler, wry::http::Response};
use dioxus::prelude::*;
@@ -16,8 +22,8 @@ fn app() -> Element {
});
rsx! {
div {
img { src: "/logos/logo.png" }
}
style { {include_str!("./assets/custom_assets.css")} }
h1 { "Dynamic Assets" }
img { src: "/logos/logo.png" }
}
}