1use gpui::{Div, Render};
2use story::Story;
3
4use crate::prelude::*;
5use crate::Avatar;
6
7pub struct AvatarStory;
8
9impl Render for AvatarStory {
10 type Element = Div;
11
12 fn render(&mut self, _cx: &mut ViewContext<Self>) -> Self::Element {
13 Story::container()
14 .child(Story::title_for::<Avatar>())
15 .child(Story::label("Default"))
16 .child(Avatar::new(
17 "https://avatars.githubusercontent.com/u/1714999?v=4",
18 ))
19 .child(Avatar::new(
20 "https://avatars.githubusercontent.com/u/326587?v=4",
21 ))
22 .child(
23 Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
24 .availability_indicator(true),
25 )
26 .child(
27 Avatar::new("https://avatars.githubusercontent.com/u/326587?v=4")
28 .availability_indicator(false),
29 )
30 }
31}