carboncloud / ui-library / Ui.Dialog

Component of a Dialog

view : { title : String, labelId : String, content : Accessibility.Styled.Html msg, onClose : msg, actionButtons : List ( { onClick : Maybe msg, color : Ui.Button.ButtonColor, emphasis : Ui.Button.ButtonEmphasis }, Ui.Button.ButtonContent ) } -> Accessibility.Styled.Html msg

View of a dialog

title           - text to be displayed at the top of the dialog
labelId         - identifier of the dialog, we need this for a11y
content         - content displayed just below the title
onClose         - action when the dialog should be closed
actionButtons   - list of buttons and actions that should be displayed at the bottom right corner of the dialog


type Label
    = LabelledBy String
    | Label String
A widget can either by labeled by itself of labelled by another element