Tweak style for color scale story
This commit is contained in:
@@ -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))),
|
||||
))
|
||||
})),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user