dioxus/examples/_examples/many.rs

24 lines
639 B
Rust
Raw Normal View History

use dioxus_core as dioxus;
2021-06-08 18:00:29 +00:00
use dioxus_core::prelude::*;
use dioxus_html as dioxus_elements;
2021-06-08 18:00:29 +00:00
use dioxus_web::WebsysRenderer;
fn main() {
wasm_logger::init(wasm_logger::Config::new(log::Level::Debug));
console_error_panic_hook::set_once();
log::info!("hello world");
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example));
}
2021-07-16 20:11:25 +00:00
pub static Example: FC<()> = |cx| {
2021-06-26 01:15:33 +00:00
cx.render(rsx! {
2021-06-08 18:00:29 +00:00
div {
span {
class: "px-2 py-1 flex w-36 mt-4 items-center text-xs rounded-md font-semibold text-yellow-500 bg-yellow-100"
"DUE DATE : 18 JUN"
}
}
})
};