add badge
This commit is contained in:
@@ -8,6 +8,7 @@ use gpui::{
|
||||
};
|
||||
use gpui_native_core::alert::{Alert, AlertSeverity, Alerts, AlertsView};
|
||||
use gpui_native_core::avatar::Avatar;
|
||||
use gpui_native_core::badge::{Badge, BadgeVariant};
|
||||
use gpui_native_core::button::{Button, ButtonVariant};
|
||||
use gpui_native_core::checkbox::Checkbox;
|
||||
use gpui_native_core::common::{Sizable as _, h_flex, v_flex};
|
||||
@@ -968,6 +969,27 @@ impl Render for Gallery {
|
||||
.child(Avatar::new("desk@reya.info").name("Help Desk").large()),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.gap_2()
|
||||
.child(section_label(
|
||||
"badge · native refs — WinUI InfoBadge, macOS app badge, GTK count pill",
|
||||
colors,
|
||||
))
|
||||
.child(
|
||||
h_flex()
|
||||
.gap_3()
|
||||
.child(Badge::new("3"))
|
||||
.child(Badge::new("new").variant(BadgeVariant::Accent))
|
||||
.child(Badge::new("synced").variant(BadgeVariant::Success))
|
||||
.child(Badge::new("drift").variant(BadgeVariant::Warning))
|
||||
.child(Badge::new("12").variant(BadgeVariant::Danger))
|
||||
.child(Badge::new("small").small())
|
||||
.child(Badge::new("large").large()),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
|
||||
Reference in New Issue
Block a user