mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 12:46:07 +00:00
Tweak style for color scale story
This commit is contained in:
parent
49571127da
commit
607813e646
1 changed files with 13 additions and 3 deletions
|
@ -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))),
|
||||
))
|
||||
})),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue