QiTASC / hatchinq / Hatchinq.Card

Exposed


type alias Config msg =
{ theme : Hatchinq.Theme.Theme
, lift : Message msg -> msg 
}


type Layout
    = MediaTop
    | MediaCenter


type Message msg
    = ToggleExpanded


type alias State =
{ contentExpanded : Basics.Bool }


type Thumbnail
    = Icon String
    | Image String


type alias Title =
{ head : String
, subHead : Maybe String 
}


type alias View msg =
{ media : Element msg
, titles : Title
, thumbnail : Thumbnail
, content : Element msg
, actions : List ( String
, msg )
, state : State 
}

configure : Config msg -> List (Hatchinq.Attribute.Attribute InternalConfig) -> View msg -> Element msg

expandable : Hatchinq.Attribute.Attribute InternalConfig

init : State

layout : Layout -> Hatchinq.Attribute.Attribute InternalConfig

update : (Message msg -> msg) -> Message msg -> State -> ( State, Platform.Cmd.Cmd msg )