From 5983e10cc907eac8ac9ff81730718d3637ad8e3d Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Fri, 8 Jul 2022 15:28:36 -0700 Subject: [PATCH] Remove withNriDescription --- src/Nri/Ui/Message/V3.elm | 4 ---- src/Nri/Ui/Svg/V1.elm | 21 ++------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/Nri/Ui/Message/V3.elm b/src/Nri/Ui/Message/V3.elm index 4eb800f8..79f090e6 100644 --- a/src/Nri/Ui/Message/V3.elm +++ b/src/Nri/Ui/Message/V3.elm @@ -768,7 +768,6 @@ getIcon customIcon size theme = |> NriSvg.withHeight iconSize |> NriSvg.withCss [ marginRight, Css.flexShrink Css.zero ] |> NriSvg.withLabel "Error" - |> NriSvg.withNriDescription messageIconDescription |> NriSvg.toHtml ( Nothing, Alert ) -> @@ -787,7 +786,6 @@ getIcon customIcon size theme = |> NriSvg.withHeight iconSize |> NriSvg.withCss [ marginRight, Css.flexShrink Css.zero ] |> NriSvg.withLabel "Alert" - |> NriSvg.withNriDescription messageIconDescription |> NriSvg.toHtml ( Nothing, Tip ) -> @@ -870,7 +868,6 @@ getIcon customIcon size theme = |> NriSvg.withHeight iconSize |> NriSvg.withCss [ marginRight, Css.flexShrink Css.zero ] |> NriSvg.withLabel "Success" - |> NriSvg.withNriDescription messageIconDescription |> NriSvg.toHtml ( Just icon_, _ ) -> @@ -878,7 +875,6 @@ getIcon customIcon size theme = |> NriSvg.withWidth iconSize |> NriSvg.withHeight iconSize |> NriSvg.withCss [ marginRight, Css.flexShrink Css.zero ] - |> NriSvg.withNriDescription messageIconDescription |> NriSvg.toHtml ( Nothing, Custom _ ) -> diff --git a/src/Nri/Ui/Svg/V1.elm b/src/Nri/Ui/Svg/V1.elm index 58eafccc..fad2ec86 100644 --- a/src/Nri/Ui/Svg/V1.elm +++ b/src/Nri/Ui/Svg/V1.elm @@ -1,13 +1,13 @@ module Nri.Ui.Svg.V1 exposing ( Svg - , withColor, withLabel, withWidth, withHeight, withCss, withNriDescription + , withColor, withLabel, withWidth, withHeight, withCss , fromHtml, toHtml ) {-| @docs Svg -@docs withColor, withLabel, withWidth, withHeight, withCss, withNriDescription +@docs withColor, withLabel, withWidth, withHeight, withCss @docs fromHtml, toHtml -} @@ -17,8 +17,6 @@ import Accessibility.Styled.Role as Role import Css exposing (Color) import Html.Styled as Html exposing (Html) import Html.Styled.Attributes as Attributes -import Nri.Ui.Html.Attributes.V2 as AttributesExtra -import Svg.Styled as Svg {-| Opaque type describing a non-interactable Html element. @@ -31,7 +29,6 @@ type Svg , height : Maybe Css.Px , css : List Css.Style , label : Maybe String - , attributes : List (Html.Attribute Never) } @@ -46,7 +43,6 @@ fromHtml icon = , width = Nothing , css = [] , label = Nothing - , attributes = [] } @@ -88,18 +84,6 @@ withCss css (Svg record) = Svg { record | css = record.css ++ css } -{-| -} -withCustom : List (Html.Attribute Never) -> Svg -> Svg -withCustom attributes (Svg record) = - Svg { record | attributes = attributes ++ record.attributes } - - -{-| -} -withNriDescription : String -> Svg -> Svg -withNriDescription description = - withCustom [ AttributesExtra.nriDescription description ] - - {-| Render an svg. -} toHtml : Svg -> Html msg @@ -125,6 +109,5 @@ toHtml (Svg record) = |> Just , Just Role.img ] - ++ record.attributes in Html.map never (Html.div attributes [ record.icon ])