An expandable component that fills the role of a "click to open" section
Opaque ExpandableSection
element that can produce msg
messages
expandableSection : { text : String, content : Element msg, onPress : Maybe msg } -> ExpandableSection 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.
withDynamicText : { open : String, closed : String } -> ExpandableSection msg -> ExpandableSection msg
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.
withPressMsg : msg -> ExpandableSection msg -> ExpandableSection msg
Configure the onPress
msg produced
expandSection : ExpandableSection msg -> ExpandableSection msg
Requests the state change of the element to an expanded, or open state
collapseSection : ExpandableSection msg -> ExpandableSection msg
Requests the state change of the element to a collapsed, or closed state
toMarkup : ExpandableSection msg -> Element msg
Given the custom type representation, renders as an Element msg
.