mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-22 13:12:04 +03:00
Rename Message.Warning -> Message.Alert
This commit is contained in:
parent
eb36e2a862
commit
fb6e4222ae
@ -17,7 +17,7 @@ upgrade_Nri_Ui_Alert_V4_error content =
|
|||||||
|
|
||||||
|
|
||||||
upgrade_Nri_Ui_Alert_V4_warning 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 =
|
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 =
|
upgrade_Nri_Ui_BannerAlert_V6_alert content maybeOnDismiss =
|
||||||
Message.banner Message.Warning
|
Message.banner Message.Alert
|
||||||
(Message.Html content)
|
(Message.Html content)
|
||||||
(List.filterMap identity
|
(List.filterMap identity
|
||||||
[ Maybe.map Message.onDismiss maybeOnDismiss
|
[ Maybe.map Message.onDismiss maybeOnDismiss
|
||||||
|
@ -31,11 +31,11 @@ import Nri.Ui.Svg.V1 as NriSvg exposing (Svg)
|
|||||||
import Nri.Ui.UiIcon.V1 as UiIcon
|
import Nri.Ui.UiIcon.V1 as UiIcon
|
||||||
|
|
||||||
|
|
||||||
{-| `Error` / `Warning` / `Tip` / `Success`
|
{-| `Error` / `Alert` / `Tip` / `Success`
|
||||||
-}
|
-}
|
||||||
type Theme
|
type Theme
|
||||||
= Error
|
= Error
|
||||||
| Warning
|
| Alert
|
||||||
| Tip
|
| Tip
|
||||||
| Success
|
| Success
|
||||||
| Custom
|
| Custom
|
||||||
@ -108,7 +108,7 @@ tiny theme content =
|
|||||||
, alertString Colors.purple content
|
, alertString Colors.purple content
|
||||||
]
|
]
|
||||||
|
|
||||||
Warning ->
|
Alert ->
|
||||||
[ exclamation Colors.red
|
[ exclamation Colors.red
|
||||||
, alertString Colors.redDark content
|
, alertString Colors.redDark content
|
||||||
]
|
]
|
||||||
@ -169,7 +169,7 @@ large theme content =
|
|||||||
|> NriSvg.withLabel "Error"
|
|> NriSvg.withLabel "Error"
|
||||||
}
|
}
|
||||||
|
|
||||||
Warning ->
|
Alert ->
|
||||||
{ backgroundColor = Colors.sunshine
|
{ backgroundColor = Colors.sunshine
|
||||||
, fontColor = Colors.navy
|
, fontColor = Colors.navy
|
||||||
, icon =
|
, icon =
|
||||||
@ -289,7 +289,7 @@ banner theme content attr =
|
|||||||
|> NriSvg.toHtml
|
|> NriSvg.toHtml
|
||||||
}
|
}
|
||||||
|
|
||||||
Warning ->
|
Alert ->
|
||||||
{ backgroundColor = Colors.sunshine
|
{ backgroundColor = Colors.sunshine
|
||||||
, color = Colors.navy
|
, color = Colors.navy
|
||||||
, icon =
|
, icon =
|
||||||
|
@ -35,10 +35,10 @@ init =
|
|||||||
Control.record ExampleConfig
|
Control.record ExampleConfig
|
||||||
|> Control.field "theme"
|
|> Control.field "theme"
|
||||||
(Control.choice
|
(Control.choice
|
||||||
[ ( "Error / Warning / Tip / Success"
|
[ ( "Error / Alert / Tip / Success"
|
||||||
, Control.value
|
, Control.value
|
||||||
[ Message.Error
|
[ Message.Error
|
||||||
, Message.Warning
|
, Message.Alert
|
||||||
, Message.Tip
|
, Message.Tip
|
||||||
, Message.Success
|
, Message.Success
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user