Rework ListHeader
to be more open (#3467)
This PR reworks the `ListHeader` component to be more open. The `meta` method can now be used to append meta items of any element to the `ListHeader`, and they will be rendered with the appropriate spacing between them. Release Notes: - N/A
This commit is contained in:
parent
bd6fa66a7c
commit
e5a5b1e84c
9 changed files with 112 additions and 99 deletions
|
@ -22,12 +22,12 @@ impl Render for ListStory {
|
|||
.child(Story::label("With sections"))
|
||||
.child(
|
||||
List::new()
|
||||
.child(ListHeader::new("Fruits"))
|
||||
.header(ListHeader::new("Produce"))
|
||||
.child(ListSubHeader::new("Fruits"))
|
||||
.child(ListItem::new("apple").child("Apple"))
|
||||
.child(ListItem::new("banana").child("Banana"))
|
||||
.child(ListItem::new("cherry").child("Cherry"))
|
||||
.child(ListSeparator)
|
||||
.child(ListHeader::new("Vegetables"))
|
||||
.child(ListSubHeader::new("Root Vegetables"))
|
||||
.child(ListItem::new("carrot").child("Carrot"))
|
||||
.child(ListItem::new("potato").child("Potato"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue