From ba1679e0cbfcef474854682a4920556765f1a21f Mon Sep 17 00:00:00 2001 From: Eran Machiels Date: Tue, 3 Nov 2020 15:56:38 +0100 Subject: [PATCH] Removed cui prefix --- __tests__/Icon.test.tsx | 4 ++-- src/components/Icon/Icon.tsx | 6 +++--- src/style/components/_button.scss | 2 +- src/style/components/_icons.scss | 10 +++------- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/__tests__/Icon.test.tsx b/__tests__/Icon.test.tsx index 493018e..111c053 100644 --- a/__tests__/Icon.test.tsx +++ b/__tests__/Icon.test.tsx @@ -10,7 +10,7 @@ describe('Icon test', () => { ); - expect(container.find('.cui-icon.cui-icon-home').length).toBe(1); + expect(container.find('.icon.icon-home').length).toBe(1); }); it('should render icon with specific size', () => { @@ -20,6 +20,6 @@ describe('Icon test', () => { ); - expect(container.find('.cui-icon.cui-icon-home.cui-icon-size-12').length).toBe(1); + expect(container.find('.icon.icon-home.icon-size-12').length).toBe(1); }); }); diff --git a/src/components/Icon/Icon.tsx b/src/components/Icon/Icon.tsx index a476bde..35841a2 100644 --- a/src/components/Icon/Icon.tsx +++ b/src/components/Icon/Icon.tsx @@ -19,9 +19,9 @@ const Icon = React.forwardRef(( diff --git a/src/style/components/_button.scss b/src/style/components/_button.scss index 19b96ab..55f64d3 100644 --- a/src/style/components/_button.scss +++ b/src/style/components/_button.scss @@ -96,7 +96,7 @@ display: flex; align-items: center; - .cui-icon { + .icon { font-size: 1.3rem; } &.icon-left { diff --git a/src/style/components/_icons.scss b/src/style/components/_icons.scss index 3a8fcb5..7ac870c 100644 --- a/src/style/components/_icons.scss +++ b/src/style/components/_icons.scss @@ -1,6 +1,6 @@ @use "../base/variables"; -.cui-icon { +.icon { font: { family: 'Cui-Icons'; style: normal; @@ -8,19 +8,15 @@ line-height: 1; display: inline-block; - .cui-icon-activity:before { - - } - @for $i from 1 through 12 { - &.cui-icon-size-#{$i} { + &.icon-size-#{$i} { font-size: #{$i * variables.$base-gutter-steps}rem; } } } @each $name, $icon in variables.$icons { - .cui-icon-#{$name}:before { + .icon-#{$name}:before { content: '#{$icon}'; } }