Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Simple confirm dialog, displaying an accept and close buttons and optional title. Usually embedded in a zstack component and displayed/hidden depending on context.
Synopsis
- data ConfirmCfg
- confirm :: (WidgetModel s, WidgetEvent e) => e -> e -> WidgetNode () (ConfirmEvt e) -> WidgetNode s e
- confirm_ :: (WidgetModel s, WidgetEvent e) => e -> e -> [ConfirmCfg] -> WidgetNode () (ConfirmEvt e) -> WidgetNode s e
- confirmMsg :: (WidgetModel s, WidgetEvent e) => Text -> e -> e -> WidgetNode s e
- confirmMsg_ :: (WidgetModel s, WidgetEvent e) => Text -> e -> e -> [ConfirmCfg] -> WidgetNode s e
Configuration
data ConfirmCfg Source #
Configuration options for confirm:
titleCaption
: the title of the alert dialog.acceptCaption
: the caption of the accept button.closeCaption
: the caption of the close button.
Instances
Semigroup ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm (<>) :: ConfirmCfg -> ConfirmCfg -> ConfirmCfg # sconcat :: NonEmpty ConfirmCfg -> ConfirmCfg # stimes :: Integral b => b -> ConfirmCfg -> ConfirmCfg # | |
Monoid ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm mempty :: ConfirmCfg # mappend :: ConfirmCfg -> ConfirmCfg -> ConfirmCfg # mconcat :: [ConfirmCfg] -> ConfirmCfg # | |
Default ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm def :: ConfirmCfg # | |
CmbCancelCaption ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm cancelCaption :: Text -> ConfirmCfg Source # | |
CmbAcceptCaption ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm acceptCaption :: Text -> ConfirmCfg Source # | |
CmbTitleCaption ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm titleCaption :: Text -> ConfirmCfg Source # |
Constructors
:: (WidgetModel s, WidgetEvent e) | |
=> e | The accept button event. |
-> e | The cancel button event. |
-> WidgetNode () (ConfirmEvt e) | The content to display in the dialog. |
-> WidgetNode s e | The created dialog. |
Creates a confirm dialog with the provided content.
:: (WidgetModel s, WidgetEvent e) | |
=> e | The accept button event. |
-> e | The cancel button event. |
-> [ConfirmCfg] | The config options for the dialog. |
-> WidgetNode () (ConfirmEvt e) | The content to display in the dialog. |
-> WidgetNode s e | The created dialog. |
Creates an alert dialog with the provided content. Accepts config.
:: (WidgetModel s, WidgetEvent e) | |
=> Text | The message to display in the dialog. |
-> e | The accept button event. |
-> e | The cancel button event. |
-> WidgetNode s e | The created dialog. |
Creates an alert dialog with a text message as content.
:: (WidgetModel s, WidgetEvent e) | |
=> Text | The message to display in the dialog. |
-> e | The accept button event. |
-> e | The cancel button event. |
-> [ConfirmCfg] | The config options for the dialog. |
-> WidgetNode s e | The created dialog. |
Creates an alert dialog with a text message as content. Accepts config.