From 5da258a3fcff856bd4c7ab8396c8f7866cc4f7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiczko?= Date: Fri, 10 Dec 2021 12:32:06 +0100 Subject: [PATCH] feat(message): describe type-icon with design tokens, fix snapshots --- .../__snapshots__/type-icon.spec.js.snap | 40 +++++++++---------- .../message/type-icon/type-icon.style.js | 17 +++++--- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/components/message/type-icon/__snapshots__/type-icon.spec.js.snap b/src/components/message/type-icon/__snapshots__/type-icon.spec.js.snap index de1fe3e317..7defb91398 100644 --- a/src/components/message/type-icon/__snapshots__/type-icon.spec.js.snap +++ b/src/components/message/type-icon/__snapshots__/type-icon.spec.js.snap @@ -6,7 +6,7 @@ exports[`TypeIcon when rendered with no additional props should match the snapsh -webkit-box-align: center; -ms-flex-align: center; align-items: center; - background-color: #C7384F; + background-color: var(--colorsSemanticNegative500); display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -21,7 +21,7 @@ exports[`TypeIcon when rendered with no additional props should match the snapsh } .c0 span:before { - color: #FFFFFF; + color: var(--colorsUtilityYang100); }
theme.colors[variant]}; + background-color: ${({ variant }) => messageVariants[variant]}; display: flex; justify-content: center; line-height: 100%; @@ -12,17 +18,17 @@ const TypeIconStyle = styled.div` text-align: center; span { &:before { - color: ${({ theme }) => theme.colors.white}; + color: var(--colorsUtilityYang100); } } - ${({ theme, transparent, variant }) => + ${({ transparent, variant }) => transparent && css` background-color: transparent; span { &:before { - color: ${theme.colors[variant]}; + color: ${messageVariants[variant]}; } } `} @@ -30,7 +36,6 @@ const TypeIconStyle = styled.div` TypeIconStyle.defaultProps = { variant: "info", - theme: BaseTheme, transparent: false, };