Describes a clickable element for components with customizable clickable action.
WithIcon assembles the required configuration for having an action element.
{ label = "Create new element"
, icon = Icon.add
, action =
DialogMsg.OpenElementCreation
|> Msg.ForDialog
|> Action.DispatchMsg
}Applies a transformation to the message in a WithIcon msg, when it exists.
Action.iconMap
PageMsg.ForDialog
{ action = Action.DispatchMsg DialogMsg.Close
, icon = Icon.close
, label = "Close"
}
Either a message to be dispatched, or an link to be followed.