Make channel buttons square (#4092)

This PR makes the channel buttons square.

Release Notes:

- Adjusted the shape of the channel buttons.
This commit is contained in:
Marshall Bowers
2024-01-17 11:47:43 -05:00
committed by GitHub
parent 19c488b378
commit df67917768
3 changed files with 44 additions and 8 deletions
@@ -1,7 +1,7 @@
use gpui::Render;
use story::{StoryContainer, StoryItem, StorySection};
use crate::{prelude::*, Tooltip};
use crate::{prelude::*, IconButtonShape, Tooltip};
use crate::{IconButton, IconName};
pub struct IconButtonStory;
@@ -115,7 +115,34 @@ impl Render for IconButtonStory {
"Icon Button",
"crates/ui2/src/components/stories/icon_button.rs",
)
.children(vec![StorySection::new().children(buttons)])
.child(StorySection::new().children(buttons))
.child(
StorySection::new().child(StoryItem::new(
"Square",
h_flex()
.gap_2()
.child(
IconButton::new("square-medium", IconName::Close)
.shape(IconButtonShape::Square)
.icon_size(IconSize::Medium),
)
.child(
IconButton::new("square-small", IconName::Close)
.shape(IconButtonShape::Square)
.icon_size(IconSize::Small),
)
.child(
IconButton::new("square-xsmall", IconName::Close)
.shape(IconButtonShape::Square)
.icon_size(IconSize::XSmall),
)
.child(
IconButton::new("square-indicator", IconName::Close)
.shape(IconButtonShape::Square)
.icon_size(IconSize::Indicator),
),
)),
)
.into_element()
}
}