From 41e58c40fc10efb49fe884b48f0626ea9c87d76e Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Wed, 17 Apr 2019 14:14:11 -0700 Subject: [PATCH] Adds documentation --- src/Nri/Ui/Alert/V4.elm | 42 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/src/Nri/Ui/Alert/V4.elm b/src/Nri/Ui/Alert/V4.elm index ead63293..1af078aa 100644 --- a/src/Nri/Ui/Alert/V4.elm +++ b/src/Nri/Ui/Alert/V4.elm @@ -4,7 +4,19 @@ module Nri.Ui.Alert.V4 exposing , somethingWentWrong ) -{-| UI components that highlight information to the user. +{-| + + +# Changes from V3: + + - Changes the error font color from `purpleDark` to `purple` + - Adds `complexError` and `complexWarning` errors that support Html arguments + - Adds `somethingWentWrong` error for displaying stacktraces + + +# About: + +UI components that highlight information to the user. @docs error, success, tip, warning @docs complexError, complexWarning @@ -78,7 +90,12 @@ somethingWentWrong errorMessageForEngineers = ] -{-| -} +{-| import Nri.Ui.Alert.V4 as Alert + + view = + Alert.error "Some **awesome** message!" + +-} error : String -> Html msg error content = alert @@ -87,7 +104,12 @@ error content = ] -{-| -} +{-| import Nri.Ui.Alert.V4 as Alert + + view = + Alert.success "Some **awesome** message!" + +-} success : String -> Html msg success content = alert @@ -108,7 +130,12 @@ success content = ] -{-| -} +{-| import Nri.Ui.Alert.V4 as Alert + + view = + Alert.tip "Some **awesome** message!" + +-} tip : String -> Html msg tip content = alert @@ -117,7 +144,12 @@ tip content = ] -{-| -} +{-| import Nri.Ui.Alert.V4 as Alert + + view = + Alert.warning "Some **awesome** message!" + +-} warning : String -> Html msg warning content = alert