lenards/elm-ui-patternfly/1.1.2

NOTE: the latest version is 4.0.2

PF4.ExpandableSection

An expandable component that fills the role of a "click to open" section

Definition

Opaque ExpandableSectionelement that can produce msg messages

Constructor function

{ text : String
, content : Element msg
, onPress : Maybe msg
}

Constructs an expandable section given a String for the text, and content to "show" onPress.

The onPress message in this form will allow the handling of the state change using expandSection and collapseSection. This will be the manner of acting until the decision on whether to make this a "stateful" component has been made.

Configuration functions

{ open : String
, closed : String
}

Configure the section to have a dynamic text; text that will change when the section is "open", and "closed"

By default, an ExpandableSection will be constructed with a Closed state.

Configure the onPress msg produced

State-change functions

Requests the state change of the element to an expanded, or open state

Requests the state change of the element to a collapsed, or closed state

Rendering element

toMarkup : ExpandableSection msg -> Element msg

Given the custom type representation, renders as an Element msg.