Improved Card by dynamicifying the bars
This commit is contained in:
@@ -15,8 +15,10 @@ fn App(cx: &Arc<Context>) -> View {
|
||||
|
||||
#[component]
|
||||
fn Card(cx: &Arc<Context>, content: String) -> View {
|
||||
let bar = "-".repeat(content.len());
|
||||
|
||||
rsx! {
|
||||
"----\n{content}\n----"
|
||||
"{bar}\n{content}\n{bar}"
|
||||
}
|
||||
.view(&cx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user