fabiommendes/elm-daisy-ui/1.0.0

Daisy.Accordion

A simple accordion element

Example

-- TODO: example

Types

type alias State =
{ selected : Int }

The accordion state

type alias Config data msg =
{ msg : State -> msg
, title : data -> String
, render : data -> Html msg
, selectedClass : String
, notSelectedClass : String
}

Configure how the accordion should be rendered

Functions

view : Config data msg -> State -> List data -> Html msg

Renders accordion

init : State

Initial state

config : (State -> msg) -> (data -> String) -> (data -> Html msg) -> Config data msg

Simple config from msg, title and rendering function