indicator.rs
1use gpui::px;
2
3use crate::prelude::*;
4
5#[derive(Component)]
6pub struct UnreadIndicator;
7
8impl UnreadIndicator {
9 pub fn new() -> Self {
10 Self
11 }
12
13 fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
14 div()
15 .rounded_full()
16 .border_2()
17 .border_color(cx.theme().colors().surface_background)
18 .w(px(9.0))
19 .h(px(9.0))
20 .z_index(2)
21 .bg(cx.theme().status().info)
22 }
23}