From b262c1879b7796586f1eae46ad516338b2b6009e Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Fri, 6 Nov 2020 10:40:51 -0800 Subject: [PATCH] Adds helpers to clickable svg --- src/Nri/Ui/ClickableSvg/V2.elm | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Nri/Ui/ClickableSvg/V2.elm b/src/Nri/Ui/ClickableSvg/V2.elm index ed6e22ff..f1a56433 100644 --- a/src/Nri/Ui/ClickableSvg/V2.elm +++ b/src/Nri/Ui/ClickableSvg/V2.elm @@ -8,7 +8,7 @@ module Nri.Ui.ClickableSvg.V2 exposing , disabled , withBorder , primary, secondary, danger, dangerSecondary - , custom, css + , custom, css, nriDescription, testId, id ) {-| @@ -42,7 +42,7 @@ module Nri.Ui.ClickableSvg.V2 exposing @docs withBorder @docs primary, secondary, danger, dangerSecondary -@docs custom, css +@docs custom, css, nriDescription, testId, id -} @@ -51,6 +51,7 @@ import ClickableAttributes exposing (ClickableAttributes) import Css exposing (Color, Style) import Html.Styled as Html exposing (Html) import Html.Styled.Attributes as Attributes +import Nri.Ui.Html.Attributes.V2 as ExtraAttributes import Nri.Ui.Colors.V1 as Colors import Nri.Ui.Svg.V1 as Svg exposing (Svg) @@ -316,6 +317,24 @@ custom attributes = ) +{-| -} +nriDescription : String -> Attribute msg +nriDescription description = + custom [ ExtraAttributes.nriDescription description ] + + +{-| -} +testId : String -> Attribute msg +testId id_ = + custom [ ExtraAttributes.testId id_ ] + + +{-| -} +id : String -> Attribute msg +id id_ = + custom [ Attributes.id id_ ] + + {-| -} css : List Style -> Attribute msg css styles =