many.rs 646 B

1234567891011121314151617181920212223
  1. use dioxus_core as dioxus;
  2. use dioxus_core::prelude::*;
  3. use dioxus_html as dioxus_elements;
  4. use dioxus_web::WebsysRenderer;
  5. fn main() {
  6. wasm_logger::init(wasm_logger::Config::new(log::Level::Debug));
  7. console_error_panic_hook::set_once();
  8. log::info!("hello world");
  9. wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example));
  10. }
  11. pub static Example: FC<()> = |cx, props| {
  12. cx.render(rsx! {
  13. div {
  14. span {
  15. class: "px-2 py-1 flex w-36 mt-4 items-center text-xs rounded-md font-semibold text-yellow-500 bg-yellow-100"
  16. "DUE DATE : 18 JUN"
  17. }
  18. }
  19. })
  20. };