mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-11 07:05:38 +03:00
Message.V1 replaces Alert.V4.tip
This commit is contained in:
parent
4498ec54bf
commit
a02bc08ae9
@ -14,6 +14,10 @@ upgrade_Nri_Ui_Alert_V4_warning content =
|
||||
Message.tiny Message.Warning (Message.Markdown content)
|
||||
|
||||
|
||||
upgrade_Nri_Ui_Alert_V4_tip content =
|
||||
Message.tiny Message.Tip (Message.Markdown content)
|
||||
|
||||
|
||||
upgrade_Nri_Ui_Alert_V4_success content =
|
||||
Message.tiny Message.Success (Message.Markdown content)
|
||||
|
||||
|
@ -22,13 +22,14 @@ import Markdown
|
||||
import Nri.Ui
|
||||
import Nri.Ui.Colors.V1 as Colors
|
||||
import Nri.Ui.Fonts.V1 as Fonts
|
||||
import Nri.Ui.SpriteSheet as SpriteSheet exposing (exclamationMark)
|
||||
import Nri.Ui.SpriteSheet as SpriteSheet
|
||||
import Nri.Ui.Svg.V1 as NriSvg exposing (Svg)
|
||||
|
||||
|
||||
type Theme
|
||||
= Error
|
||||
| Warning
|
||||
| Tip
|
||||
| Success
|
||||
|
||||
|
||||
@ -53,6 +54,11 @@ tiny theme content =
|
||||
, alertString Colors.redDark content
|
||||
]
|
||||
|
||||
Tip ->
|
||||
[ iconContainer [ Css.color Colors.yellow ] (NriSvg.toHtml SpriteSheet.bulb)
|
||||
, alertString Colors.navy content
|
||||
]
|
||||
|
||||
Success ->
|
||||
[ iconContainer
|
||||
[ Css.color Colors.white
|
||||
@ -66,7 +72,7 @@ tiny theme content =
|
||||
]
|
||||
in
|
||||
Nri.Ui.styled Html.div
|
||||
"Nri-Ui-Message-V1--alert"
|
||||
"Nri-Ui-Message-V1--tiny"
|
||||
[ Css.displayFlex
|
||||
, Css.justifyContent Css.start
|
||||
, Css.alignItems Css.flexStart
|
||||
@ -125,7 +131,7 @@ exclamation backgroundColor =
|
||||
]
|
||||
(Html.div
|
||||
[ css [ Css.height (Css.px 13), Css.marginTop (Css.px 1) ] ]
|
||||
[ NriSvg.toHtml exclamationMark ]
|
||||
[ NriSvg.toHtml SpriteSheet.exclamationMark ]
|
||||
)
|
||||
|
||||
|
||||
|
@ -5,7 +5,6 @@ import Css
|
||||
import Example exposing (Example)
|
||||
import Html.Styled as Html exposing (Html, a, div, h3, pre, text)
|
||||
import Html.Styled.Attributes as Attributes exposing (href, title)
|
||||
import Nri.Ui.Alert.V4 as Alert
|
||||
import Nri.Ui.BannerAlert.V6 as BannerAlert
|
||||
import Nri.Ui.Callout.V1 as Callout exposing (callout)
|
||||
import Nri.Ui.Colors.V1 as Colors
|
||||
@ -52,7 +51,7 @@ example =
|
||||
[ Heading.h3 [] [ text "Message.tiny" ]
|
||||
, Message.tiny Message.Error (Message.Markdown "This is an **error**")
|
||||
, Message.tiny Message.Warning (Message.Markdown "This is a **warning**")
|
||||
, Alert.tip "This is a **tip**"
|
||||
, Message.tiny Message.Tip (Message.Markdown "This is a **tip**")
|
||||
, Message.tiny Message.Success (Message.Markdown "This is a **success**")
|
||||
, Html.hr [] []
|
||||
, Heading.h3 [] [ text "Message.somethingWentWrong" ]
|
||||
|
Loading…
Reference in New Issue
Block a user