sxh / ui-base / UiBase.ProductTable

Provide a consistent Product table experience

Description


type alias ProductTableDescription msg =
{ sorting : ProductTableSorting (UiBase.Product.Product -> String) msg
, setDisplayImage : Basics.Int -> msg
, currentDate : Date
, sourceHelpControl : Maybe (UiBase.Help.HelpControl msg)
, imageHelpControl : Maybe (UiBase.Help.HelpControl msg) 
}

Shared attributes and state/events that must be provided by provided by consumers


type alias ProductTableSorting c msg =
{ toggleSort : String -> c -> msg
, sortDescription : UiBase.Product.SortDescription 
}

Message used to change sorting direction, and the specification of the current sorting

Table

productTable : ProductTableDescription msg -> List UiBase.Product.Product -> Element msg

The overall table