<img width="485" alt="image" src="https://github.com/user-attachments/assets/568cbf3a-6e32-4b21-8816-5e3cb26acc82" /> <img width="755" alt="image" src="https://github.com/user-attachments/assets/5e13d6b8-e6f4-4cc3-b1f6-9b378ff523a4" />
32 lines
893 B
Rust
32 lines
893 B
Rust
use super::ListItem;
|
|
use crate::{skeleton::Skeleton, v_flex};
|
|
use gpui::{IntoElement, ParentElement as _, RenderOnce, Styled};
|
|
|
|
#[derive(IntoElement)]
|
|
pub struct Loading;
|
|
|
|
#[derive(IntoElement)]
|
|
struct LoadingItem;
|
|
|
|
impl RenderOnce for LoadingItem {
|
|
fn render(self, _: &mut gpui::WindowContext) -> impl IntoElement {
|
|
ListItem::new("skeleton").disabled(true).child(
|
|
v_flex()
|
|
.gap_1p5()
|
|
.overflow_hidden()
|
|
.child(Skeleton::new().h_5().w_48().max_w_full())
|
|
.child(Skeleton::new().secondary(true).h_3().w_64().max_w_full()),
|
|
)
|
|
}
|
|
}
|
|
|
|
impl RenderOnce for Loading {
|
|
fn render(self, _: &mut gpui::WindowContext) -> impl IntoElement {
|
|
v_flex()
|
|
.py_2p5()
|
|
.gap_3()
|
|
.child(LoadingItem)
|
|
.child(LoadingItem)
|
|
.child(LoadingItem)
|
|
}
|
|
}
|