make optional props accept T or Option<T>

This commit is contained in:
Evan Almloff committed 2023-11-29 11:38:28 -06:00
1 parent e0fbed7eea
commit be94c69f11
2 files changed
+15 -24

No files matched your search

+6
View File
@@ -12,6 +12,12 @@ fn main() {
fn app(cx: Scope) -> Element {
cx.render(rsx! {
Button {
a: "asd".to_string(),
c: "asd".to_string(),
d: Some("asd".to_string()),
e: Some("asd".to_string()),
}
Button {
a: "asd".to_string(),
c: "asd".to_string(),