NoRedInk/noredink-ui/9.5.1

NOTE: the latest version is 35.9.3

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 9.5.1 found (15 same-name repos checked); no cached copy. Use another version.

Details

Nri.Ui.Accordion.V1

view : AccordionOptions entry msg -> Html msg
viewKeyed : AccordionOptions entry msg -> (entry -> String) -> Html msg

If your accordion's rows can be moved around, use viewKeyed. It prevents the caret's animation from firing off incorrectly when rows move.

viewCaret : Bool -> Caret -> Html msg

Just the caret!

type Caret
= DefaultCaret
| WhiteCaret
| NoneCaret

DefaultCaret is the blue caret

type alias AccordionOptions entry msg =
{ entries : List ( entry, Bool )
, viewHeader : entry -> Html msg
, viewContent : entry -> Html msg
, customStyles : Maybe (entry -> StyleOptions)
, caret : Caret
, toggle : entry -> Bool -> msg
}
type alias StyleOptions =
{ entryStyles : List Style
, entryExpandedStyles : List Style
, entryClosedStyles : List Style
, headerStyles : List Style
, headerExpandedStyles : List Style
, headerClosedStyles : List Style
, contentStyles : List Style
}