ui: Add Chip component (#34521)

Possibly the simplest component in our set, but a nice one to have so we
can standardize how it looks across the app.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-07-16 01:15:45 -03:00 committed by GitHub
parent ee4b9a27a2
commit 59d524427e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 124 additions and 40 deletions

View file

@ -24,7 +24,7 @@ use settings::Settings;
use strum::IntoEnumIterator as _;
use theme::ThemeSettings;
use ui::{
CheckboxWithLabel, ContextMenu, PopoverMenu, ScrollableHandle, Scrollbar, ScrollbarState,
CheckboxWithLabel, Chip, ContextMenu, PopoverMenu, ScrollableHandle, Scrollbar, ScrollbarState,
ToggleButton, Tooltip, prelude::*,
};
use vim_mode_setting::VimModeSetting;
@ -759,20 +759,7 @@ impl ExtensionsPage {
_ => {}
}
Some(
div()
.px_1()
.border_1()
.rounded_sm()
.border_color(cx.theme().colors().border)
.bg(cx.theme().colors().element_background)
.child(
Label::new(extension_provides_label(
*provides,
))
.size(LabelSize::XSmall),
),
)
Some(Chip::new(extension_provides_label(*provides)))
})
.collect::<Vec<_>>(),
),