Skip to content

Commit 14bc509

Browse files
authored
Merge pull request #16 from coderan-io/fix/names
Removed cui prefix
2 parents 1f519a9 + ba1679e commit 14bc509

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

__tests__/Icon.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Icon test', () => {
1010
</div>
1111
);
1212

13-
expect(container.find('.cui-icon.cui-icon-home').length).toBe(1);
13+
expect(container.find('.icon.icon-home').length).toBe(1);
1414
});
1515

1616
it('should render icon with specific size', () => {
@@ -20,6 +20,6 @@ describe('Icon test', () => {
2020
</div>
2121
);
2222

23-
expect(container.find('.cui-icon.cui-icon-home.cui-icon-size-12').length).toBe(1);
23+
expect(container.find('.icon.icon-home.icon-size-12').length).toBe(1);
2424
});
2525
});

src/components/Icon/Icon.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ const Icon = React.forwardRef<HTMLElement, IconProps>((
1919
<i
2020
ref={ref}
2121
className={clsx(
22-
'cui-icon',
23-
`cui-icon-${icon}`,
24-
size && `cui-icon-size-${size}`,
22+
'icon',
23+
`icon-${icon}`,
24+
size && `icon-size-${size}`,
2525
className
2626
)}
2727
/>

src/style/components/_button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
display: flex;
9797
align-items: center;
9898

99-
.cui-icon {
99+
.icon {
100100
font-size: 1.3rem;
101101
}
102102
&.icon-left {

src/style/components/_icons.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
@use "../base/variables";
22

3-
.cui-icon {
3+
.icon {
44
font: {
55
family: 'Cui-Icons';
66
style: normal;
77
}
88
line-height: 1;
99
display: inline-block;
1010

11-
.cui-icon-activity:before {
12-
13-
}
14-
1511
@for $i from 1 through 12 {
16-
&.cui-icon-size-#{$i} {
12+
&.icon-size-#{$i} {
1713
font-size: #{$i * variables.$base-gutter-steps}rem;
1814
}
1915
}
2016
}
2117

2218
@each $name, $icon in variables.$icons {
23-
.cui-icon-#{$name}:before {
19+
.icon-#{$name}:before {
2420
content: '#{$icon}';
2521
}
2622
}

0 commit comments

Comments
 (0)