| 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 |
Monomer.Widgets.Containers.Confirm
Contents
Description
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 Methods (<>) :: ConfirmCfg -> ConfirmCfg -> ConfirmCfg # sconcat :: NonEmpty ConfirmCfg -> ConfirmCfg # stimes :: Integral b => b -> ConfirmCfg -> ConfirmCfg # | |
| Monoid ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm Methods mempty :: ConfirmCfg # mappend :: ConfirmCfg -> ConfirmCfg -> ConfirmCfg # mconcat :: [ConfirmCfg] -> ConfirmCfg # | |
| Default ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm Methods def :: ConfirmCfg # | |
| CmbCancelCaption ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm Methods cancelCaption :: Text -> ConfirmCfg Source # | |
| CmbAcceptCaption ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm Methods acceptCaption :: Text -> ConfirmCfg Source # | |
| CmbTitleCaption ConfirmCfg Source # | |
Defined in Monomer.Widgets.Containers.Confirm Methods titleCaption :: Text -> ConfirmCfg Source # | |
Constructors
Arguments
| :: (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.
Arguments
| :: (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.
Arguments
| :: (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.
Arguments
| :: (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.