Some more layout features, align/stretch.

This commit is contained in:
2026-03-25 22:57:58 -04:00
parent cd55cf14c5
commit e2c2563b7e
6 changed files with 115 additions and 13 deletions

View File

@@ -41,7 +41,7 @@ fn CounterApp(title: &'static str) -> impl IntoView {
};
view! {
column(gap = 16.0, padding = 24.0, text_style = text_style) {
column(gap = 16.0, padding = 24.0, align_items = AlignItems::Center, text_style = text_style) {
text(role = TextRole::Heading(1), size = 32.0, weight = FontWeight::Semibold, color = Color::rgba(0, 0, 0, 255)) {
title
}
@@ -51,6 +51,7 @@ fn CounterApp(title: &'static str) -> impl IntoView {
block(
padding = 16.0,
gap = 8.0,
align_self = AlignItems::Stretch,
background = Color::rgba(255, 255, 255, 200),
border_radius = 12.0,
border = Border::new(2.0, Color::rgba(0, 0, 0, 120)),