Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Tweak style for color scale story

Marshall Bowers607813e646e5
diff --git a/crates/storybook2/src/stories/colors.rs b/crates/storybook2/src/stories/colors.rs
index a0a06200859..d0f938e57d4 100644
--- a/crates/storybook2/src/stories/colors.rs
+++ b/crates/storybook2/src/stories/colors.rs
@@ -1,3 +1,4 @@
+use gpui2::px;
use ui::prelude::*;
use crate::story::Story;
@@ -16,12 +17,21 @@ impl ColorsStory {
.id("colors")
.flex()
.flex_col()
+ .gap_1()
.overflow_y_scroll()
.text_color(gpui2::white())
.children(color_scales.into_iter().map(|(name, scale)| {
- div().child(name.to_string()).child(div().flex().children(
- (1..=12).map(|step| div().flex().size_4().bg(scale.step(cx, step))),
- ))
+ div()
+ .flex()
+ .child(
+ div()
+ .w(px(75.))
+ .line_height(px(24.))
+ .child(name.to_string()),
+ )
+ .child(div().flex().gap_1().children(
+ (1..=12).map(|step| div().flex().size_6().bg(scale.step(cx, step))),
+ ))
})),
)
}