Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Enable text wrapping for `Details`
Marshall Bowers4dc244002476
diff --git a/crates/ui2/src/elements/details.rs b/crates/ui2/src/elements/details.rsindex 61b793480fc..e53e5f7cf50 100644--- a/crates/ui2/src/elements/details.rs+++ b/crates/ui2/src/elements/details.rs@@ -38,6 +38,7 @@ impl<S: 'static + Send + Sync> Details<S> {.gap_0p5().text_xs().text_color(color.text)+ .size_full().child(self.text).children(self.meta.map(|m| m)).children(self.actions.take().map(|a| a))@@ -49,7 +50,7 @@ pub use stories::*;#[cfg(feature = "stories")]mod stories {- use crate::Story;+ use crate::{Button, Story};use super::*;@@ -79,6 +80,15 @@ mod stories {Details::new("The quick brown fox jumps over the lazy dog").meta_text("Sphinx of black quartz, judge my vow."),)+ .child(Story::label(cx, "With meta and actions"))+ .child(+ Details::new("The quick brown fox jumps over the lazy dog")+ .meta_text("Sphinx of black quartz, judge my vow.")+ .actions(ButtonGroup::new(vec![+ Button::new("Decline"),+ Button::new("Accept").variant(crate::ButtonVariant::Filled),+ ])),+ )}}}