mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
be99e29e5f
* fix: fmt unterminated if, be more aggressive with line splits * Fix: Handle long exprs in for/if statements
62 lines
1.1 KiB
R
62 lines
1.1 KiB
R
#[component]
|
|
fn SomePassthru(class: String, id: String, children: Element) -> Element {
|
|
rsx! {
|
|
div {
|
|
// Comments
|
|
class,
|
|
"hello world"
|
|
}
|
|
h1 { class, "hello world" }
|
|
|
|
h1 { class, {children} }
|
|
|
|
h1 { class, id, {children} }
|
|
|
|
h1 { class,
|
|
"hello world"
|
|
{children}
|
|
}
|
|
|
|
h1 { id,
|
|
"hello world"
|
|
{children}
|
|
}
|
|
|
|
Other { class, children }
|
|
|
|
Other { class,
|
|
"hello world"
|
|
{children}
|
|
}
|
|
|
|
div {
|
|
// My comment here 1
|
|
// My comment here 2
|
|
// My comment here 3
|
|
// My comment here 4
|
|
class: "asdasd",
|
|
|
|
// Comment here
|
|
onclick: move |_| {
|
|
let a = 10;
|
|
let b = 40;
|
|
let c = 50;
|
|
},
|
|
|
|
// my comment
|
|
|
|
// This here
|
|
"hi"
|
|
}
|
|
|
|
// Comment head
|
|
div { class: "asd", "Jon" }
|
|
|
|
// Comment head
|
|
div {
|
|
// Collapse
|
|
class: "asd",
|
|
"Jon"
|
|
}
|
|
}
|
|
}
|