Remove unneeded wrapping divs in ListItem left content (#3438)

This PR removes some unneeded wrapping `div`s around the left content in
`ListItem`s.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2023-11-29 12:40:35 -05:00
committed by GitHub
2 changed files with 26 additions and 16 deletions
+15 -1
View File
@@ -2,7 +2,7 @@ use gpui::{Div, Render};
use story::Story;
use crate::prelude::*;
use crate::ListItem;
use crate::{Icon, ListItem};
pub struct ListItemStory;
@@ -14,6 +14,20 @@ impl Render for ListItemStory {
.child(Story::title_for::<ListItem>())
.child(Story::label("Default"))
.child(ListItem::new("hello_world").child("Hello, world!"))
.child(Story::label("With left icon"))
.child(
ListItem::new("with_left_icon")
.child("Hello, world!")
.left_icon(Icon::Bell),
)
.child(Story::label("With left avatar"))
.child(
ListItem::new("with_left_avatar")
.child("Hello, world!")
.left_avatar(SharedString::from(
"https://avatars.githubusercontent.com/u/1714999?v=4",
)),
)
.child(Story::label("With `on_click`"))
.child(
ListItem::new("with_on_click")