…lines 1–26 unchanged (26 lines)
27impl RenderOnce for DiffStat {
28 fn render(self, _: &mut Window, _cx: &mut App) -> impl IntoElement {
29 h_flex()
30 .id(self.id)
31 .gap_1()
32 .child(
33 h_flex()
34 .gap_0p5()
35 .child(
36 Icon::new(IconName::Plus)
37 .size(IconSize::XSmall)
38 .color(Color::Success),
39 )
40 .child(
41 Label::new(self.added.to_string())
42 .color(Color::Success)
43 .size(self.label_size),
44 ),
45 )
46 .child(
47 h_flex()
48 .gap_0p5()
49 .child(
50 Icon::new(IconName::Dash)
51 .size(IconSize::XSmall)
52 .color(Color::Error),
53 )
54 .child(
55 Label::new(self.removed.to_string())
56 .color(Color::Error)
57 .size(self.label_size),
58 ),
59 )
60 }
61}
62
63impl Component for DiffStat {
64 fn scope() -> ComponentScope {
…lines 65–93 unchanged (29 lines)