Dupe tertiary styles to quaternary

This commit is contained in:
Tessa Kelly 2022-12-08 09:41:55 -07:00
parent da61cd5336
commit 94c86a4106
2 changed files with 23 additions and 3 deletions

View File

@ -6,7 +6,7 @@ module Nri.Ui.ClickableSvg.V2 exposing
, exactSize, exactWidth, exactHeight , exactSize, exactWidth, exactHeight
, disabled , disabled
, withBorder , withBorder
, primary, secondary, tertiary, danger, dangerSecondary , primary, secondary, tertiary, quaternary, danger, dangerSecondary
, custom, nriDescription, testId, id , custom, nriDescription, testId, id
, css, notMobileCss, mobileCss, quizEngineMobileCss , css, notMobileCss, mobileCss, quizEngineMobileCss
, iconForMobile, iconForQuizEngineMobile, iconForNarrowMobile , iconForMobile, iconForQuizEngineMobile, iconForNarrowMobile
@ -48,7 +48,7 @@ module Nri.Ui.ClickableSvg.V2 exposing
## Customization ## Customization
@docs withBorder @docs withBorder
@docs primary, secondary, tertiary, danger, dangerSecondary @docs primary, secondary, tertiary, quaternary, danger, dangerSecondary
@docs custom, nriDescription, testId, id @docs custom, nriDescription, testId, id
@ -270,6 +270,7 @@ type Theme
= Primary = Primary
| Secondary | Secondary
| Tertiary | Tertiary
| Quaternary
| Danger | Danger
| DangerSecondary | DangerSecondary
@ -335,6 +336,17 @@ applyTheme theme =
, borderHover = Colors.azure , borderHover = Colors.azure
} }
Quaternary ->
{ main_ = Colors.gray45
, mainHovered = Colors.azure
, background = Colors.gray96
, backgroundHovered = Colors.glacier
, includeBorder = True
, borderColor = Colors.gray92
, borderBottom = Colors.gray92
, borderHover = Colors.azure
}
Danger -> Danger ->
{ main_ = Colors.white { main_ = Colors.white
, mainHovered = Colors.white , mainHovered = Colors.white
@ -380,6 +392,13 @@ tertiary =
set (\attributes -> { attributes | theme = Tertiary }) set (\attributes -> { attributes | theme = Tertiary })
{-| Used to de-emphasize elements when not hovered.
-}
quaternary : Attribute msg
quaternary =
set (\attributes -> { attributes | theme = Quaternary })
{-| White/transparent icon on a red background. {-| White/transparent icon on a red background.
-} -}
danger : Attribute msg danger : Attribute msg

View File

@ -188,8 +188,9 @@ viewExampleTable { label, icon, attributes } =
List.indexedMap viewExampleRow List.indexedMap viewExampleRow
[ ( "primary", ClickableSvg.primary ) [ ( "primary", ClickableSvg.primary )
, ( "secondary", ClickableSvg.secondary ) , ( "secondary", ClickableSvg.secondary )
, ( "danger", ClickableSvg.danger )
, ( "tertiary", ClickableSvg.tertiary ) , ( "tertiary", ClickableSvg.tertiary )
, ( "quaternary", ClickableSvg.quaternary )
, ( "danger", ClickableSvg.danger )
, ( "dangerSecondary", ClickableSvg.dangerSecondary ) , ( "dangerSecondary", ClickableSvg.dangerSecondary )
] ]
, Html.tfoot [] , Html.tfoot []