make optional props accept T or Option<T>
This commit is contained in:
1 parent
e0fbed7eea
commit
be94c69f11
2 files changed
+15
-24
No files matched your search
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user