2020-04-28 01:10:17 +03:00
|
|
|
module MessageV1 exposing (..)
|
|
|
|
|
|
|
|
{-| NOTE: requires elm-refactor alpha-220-g24db2f5 or later.
|
|
|
|
-}
|
|
|
|
|
|
|
|
import Nri.Ui.Message.V1 as Message
|
|
|
|
|
|
|
|
|
2020-04-28 02:30:09 +03:00
|
|
|
|
|
|
|
--
|
|
|
|
-- Nri.Ui.Alert.V4
|
|
|
|
--
|
|
|
|
|
|
|
|
|
2020-04-28 01:10:17 +03:00
|
|
|
upgrade_Nri_Ui_Alert_V4_error content =
|
|
|
|
Message.tiny Message.Error (Message.Markdown content)
|
|
|
|
|
|
|
|
|
2020-04-28 01:25:18 +03:00
|
|
|
upgrade_Nri_Ui_Alert_V4_warning content =
|
2020-04-28 22:49:04 +03:00
|
|
|
Message.tiny Message.Alert (Message.Markdown content)
|
2020-04-28 01:25:18 +03:00
|
|
|
|
|
|
|
|
2020-04-28 01:29:06 +03:00
|
|
|
upgrade_Nri_Ui_Alert_V4_tip content =
|
|
|
|
Message.tiny Message.Tip (Message.Markdown content)
|
|
|
|
|
|
|
|
|
2020-04-28 01:22:43 +03:00
|
|
|
upgrade_Nri_Ui_Alert_V4_success content =
|
|
|
|
Message.tiny Message.Success (Message.Markdown content)
|
|
|
|
|
|
|
|
|
2020-04-28 01:10:17 +03:00
|
|
|
upgrade_Nri_Ui_Alert_V4_somethingWentWrong errorMessageForEngineers =
|
|
|
|
Message.somethingWentWrong errorMessageForEngineers
|
2020-04-28 02:30:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Nri.Ui.BannerAlert.V6
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
|
|
upgrade_Nri_Ui_BannerAlert_V6_alert content maybeOnDismiss =
|
2020-04-28 22:49:04 +03:00
|
|
|
Message.banner Message.Alert
|
2020-04-28 02:30:09 +03:00
|
|
|
(Message.Html content)
|
|
|
|
(List.filterMap identity
|
|
|
|
[ Maybe.map Message.onDismiss maybeOnDismiss
|
|
|
|
]
|
|
|
|
)
|
2020-04-28 02:35:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
upgrade_Nri_Ui_BannerAlert_V6_error content maybeOnDismiss =
|
|
|
|
Message.banner Message.Error
|
|
|
|
(Message.Html content)
|
|
|
|
(List.filterMap identity
|
|
|
|
[ Maybe.map Message.onDismiss maybeOnDismiss
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
upgrade_Nri_Ui_BannerAlert_V6_neutral content maybeOnDismiss =
|
|
|
|
Message.banner Message.Tip
|
|
|
|
(Message.Html content)
|
|
|
|
(List.filterMap identity
|
|
|
|
[ Maybe.map Message.onDismiss maybeOnDismiss
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
upgrade_Nri_Ui_BannerAlert_V6_success content maybeOnDismiss =
|
|
|
|
Message.banner Message.Success
|
|
|
|
(Message.Html content)
|
|
|
|
(List.filterMap identity
|
|
|
|
[ Maybe.map Message.onDismiss maybeOnDismiss
|
|
|
|
]
|
|
|
|
)
|
2020-04-28 02:49:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
upgrade_Nri_Ui_BannerAlert_V6_custom config =
|
|
|
|
Message.banner
|
|
|
|
(Message.Custom
|
|
|
|
{ color = config.color
|
|
|
|
, backgroundColor = config.backgroundColor
|
|
|
|
, icon = config.icon
|
|
|
|
}
|
|
|
|
)
|
|
|
|
(Message.Html config.content)
|
|
|
|
(List.filterMap identity
|
|
|
|
[ Maybe.map Message.onDismiss config.dismiss
|
|
|
|
]
|
|
|
|
)
|