mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-23 16:32:11 +03:00
Remove withNriDescription
This commit is contained in:
parent
917f775131
commit
5983e10cc9
@ -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 _ ) ->
|
||||
|
@ -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 ])
|
||||
|
Loading…
Reference in New Issue
Block a user