File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed
frameworks/keyed/dioxus/src Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ struct RowData {
63
63
64
64
static ID_COUNTER : AtomicUsize = AtomicUsize :: new ( 1 ) ;
65
65
66
+
66
67
fn build_data ( count : usize ) -> Vec < RowData > {
67
68
let mut thread_rng = thread_rng ( ) ;
68
69
@@ -92,6 +93,22 @@ fn build_data(count: usize) -> Vec<RowData> {
92
93
data
93
94
}
94
95
96
+ #[ component]
97
+ fn ActionButton ( name : String , id : String , onclick : EventHandler ) -> Element {
98
+ rsx ! {
99
+ div {
100
+ class: "col-sm-6 smallpad" ,
101
+ button {
102
+ class: "btn btn-primary btn-block" ,
103
+ r#type: "button" ,
104
+ id: id,
105
+ onclick: move |_| onclick. call( ( ) ) ,
106
+ "{name}" ,
107
+ }
108
+ }
109
+ }
110
+ }
111
+
95
112
#[ component]
96
113
fn app ( ) -> Element {
97
114
let mut data = use_signal ( || Vec :: < RowData > :: new ( ) ) ;
@@ -195,18 +212,3 @@ fn app() -> Element {
195
212
}
196
213
}
197
214
198
- #[ component]
199
- fn ActionButton ( name : String , id : String , onclick : EventHandler ) -> Element {
200
- rsx ! {
201
- div {
202
- class: "col-sm-6 smallpad" ,
203
- button {
204
- class: "btn btn-primary btn-block" ,
205
- r#type: "button" ,
206
- id: id,
207
- onclick: move |_| onclick. call( ( ) ) ,
208
- "{name}" ,
209
- }
210
- }
211
- }
212
- }
You can’t perform that action at this time.
0 commit comments