From 6a6ff39e486b26ffc9ba8b5c072b27e57b903cb2 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Wed, 8 Nov 2023 23:35:12 +0000 Subject: [PATCH] Add text to taffy example --- examples/taffy.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/taffy.rs b/examples/taffy.rs index 9b7f1b98d..9c4caed92 100644 --- a/examples/taffy.rs +++ b/examples/taffy.rs @@ -36,8 +36,11 @@ fn app_logic(data: &mut i32) -> impl View { s.justify_content = Some(JustifyContent::Center); s.align_items = Some(AlignItems::Center); }), - div(()) + div(String::from("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")) .with_background_color(Color::RED) + .with_style(|s| s.padding = length(20.0)), + div(()) + .with_background_color(Color::FOREST_GREEN) .with_style(|s| s.flex_grow = 1.0), )) .with_style(|s| {