SummaryListItem represents a single item in a list that is usually selectable or searchable.
This component is meant to be used with ListView.
import UI.SummaryListItem as Summary
listItemView : AppConfig -> Bool -> Item -> Element Msg
listItemView appConfig isSelected item =
Summary.view appConfig.renderConfig
isSelected
item.name
item.subtitle
(Badge.grayLight "badge")
listView : AppConfig -> Model -> ListView Item Msg
listView appConfig model =
listItemView appConfig
|> ListView.selectList Msg.Select Item.id
|> ListView.withSearchField (searchField appConfig model)
|> ListView.withActionBar (actionBar appConfig)
|> ListView.withDomId "item-list"
This component does not use a builder pattern so this is the only way to render it. The
isSelectedparam alters its colors for contrast