Rename Message.Warning -> Message.Alert

This commit is contained in:
Aaron VonderHaar 2020-04-28 12:49:04 -07:00
parent eb36e2a862
commit fb6e4222ae
3 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@ upgrade_Nri_Ui_Alert_V4_error content =
upgrade_Nri_Ui_Alert_V4_warning content =
Message.tiny Message.Warning (Message.Markdown content)
Message.tiny Message.Alert (Message.Markdown content)
upgrade_Nri_Ui_Alert_V4_tip content =
@ -39,7 +39,7 @@ upgrade_Nri_Ui_Alert_V4_somethingWentWrong errorMessageForEngineers =
upgrade_Nri_Ui_BannerAlert_V6_alert content maybeOnDismiss =
Message.banner Message.Warning
Message.banner Message.Alert
(Message.Html content)
(List.filterMap identity
[ Maybe.map Message.onDismiss maybeOnDismiss

View File

@ -31,11 +31,11 @@ import Nri.Ui.Svg.V1 as NriSvg exposing (Svg)
import Nri.Ui.UiIcon.V1 as UiIcon
{-| `Error` / `Warning` / `Tip` / `Success`
{-| `Error` / `Alert` / `Tip` / `Success`
-}
type Theme
= Error
| Warning
| Alert
| Tip
| Success
| Custom
@ -108,7 +108,7 @@ tiny theme content =
, alertString Colors.purple content
]
Warning ->
Alert ->
[ exclamation Colors.red
, alertString Colors.redDark content
]
@ -169,7 +169,7 @@ large theme content =
|> NriSvg.withLabel "Error"
}
Warning ->
Alert ->
{ backgroundColor = Colors.sunshine
, fontColor = Colors.navy
, icon =
@ -289,7 +289,7 @@ banner theme content attr =
|> NriSvg.toHtml
}
Warning ->
Alert ->
{ backgroundColor = Colors.sunshine
, color = Colors.navy
, icon =

View File

@ -35,10 +35,10 @@ init =
Control.record ExampleConfig
|> Control.field "theme"
(Control.choice
[ ( "Error / Warning / Tip / Success"
[ ( "Error / Alert / Tip / Success"
, Control.value
[ Message.Error
, Message.Warning
, Message.Alert
, Message.Tip
, Message.Success
]