This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Allow for multiple classes #1842
Closed
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
1932ea5
sky-icon component
2c37daa
finishing up component
534682e
created demo for sky-icon component
4792244
added imports and exports to core, demo, and index
9b898bf
Added the visual test
b58160d
Fixing unit tests
57eeff6
Fixing TSLint issues
581ddcb
Fixed visual test
752c8cb
updating visual test
26a7c87
fixing TSLint errors
16cd7aa
fdescribe to describe
0d3384e
Merge branch 'master' into sky-icon
HJain01 7561296
fixing merge
c8abd9a
Merge branch 'master' into sky-icon
Blackbaud-SteveBrush 12eba05
Merged master
Blackbaud-SteveBrush a2422f9
Fixed missing tile style sheet
Blackbaud-SteveBrush ac41d78
Updated demo
Blackbaud-SteveBrush 325bfad
Added more icons to visual test
Blackbaud-SteveBrush 3072ee8
Merge branch 'master' into contrib-sky-icon
Blackbaud-SteveBrush cdecb5a
Allow for multiple classes
55fde1a
Merge branch 'master' into sky-icon-edits
HJain01 beec5db
Fixed unit test
f7a497f
Merge branch 'sky-icon-edits' of https://github.com/Remulus2006/skyux…
1f2b52f
Added unit test to check for optional fixedWidth
7ea881c
Checks to see how many classes there are
257b8e4
fdescribe to describe
da17078
Fixed PR suggestions
2fbcc76
changed to alphabetical order and got rid of an f
39ed79c
Moved angled bracket
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 32 additions & 11 deletions
43
skyux-spa-visual-tests/src/app/icon/icon-visual.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
<div id="screenshot-icon"> | ||
<sky-icon icon="circle"></sky-icon> | ||
<sky-icon icon="trash"></sky-icon> | ||
<sky-icon icon="bars"></sky-icon> | ||
<sky-icon icon="cog"></sky-icon> | ||
<sky-icon icon="database"></sky-icon> | ||
<sky-icon icon="users"></sky-icon> | ||
<sky-icon icon="user"></sky-icon> | ||
<sky-icon icon="comment"></sky-icon> | ||
<sky-icon icon="chevron-down"></sky-icon> | ||
<sky-icon icon="chevron-up"></sky-icon> | ||
<div | ||
id="screenshot-icon"> | ||
<sky-icon | ||
icon="circle"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="trash"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="bars"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="cog"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="database"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="users"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="user"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="comment"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="chevron-down"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="chevron-up"> | ||
</sky-icon> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,41 @@ | ||
<sky-icon icon="spinner" size="3x" fixedWidth="true"></sky-icon> | ||
<sky-icon icon="trash" size="sm"></sky-icon> | ||
<sky-icon icon="bars" size="lg"></sky-icon> | ||
<sky-icon icon="cog" size="2x"></sky-icon> | ||
<sky-icon icon="database" size="3x"></sky-icon> | ||
<sky-icon icon="users" size="4x"></sky-icon> | ||
<sky-icon icon="user" size="5x"></sky-icon> | ||
<sky-icon icon="comment" size="xs"></sky-icon> | ||
<sky-icon icon="chevron-down" size="sm"></sky-icon> | ||
<sky-icon icon="chevron-up" size="5x"></sky-icon> | ||
<sky-icon | ||
icon="bars" | ||
size="lg"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="chevron-down" | ||
size="sm"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="chevron-up" | ||
size="5x"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="cog" | ||
size="2x"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="comment" | ||
size="xs"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="database" | ||
size="3x"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="spinner" | ||
size="3x" | ||
fixedWidth="true"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="trash" | ||
size="sm"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="users" | ||
size="4x"> | ||
</sky-icon> | ||
<sky-icon | ||
icon="user" | ||
size="5x"> | ||
</sky-icon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
<sky-icon [icon]="icon" [size]="size" [fixedWidth]="fixedWidth"></sky-icon> | ||
<sky-icon | ||
[icon]="icon" | ||
[size]="size" | ||
[fixedWidth]="fixedWidth"> | ||
</sky-icon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<i *ngIf="icon" | ||
<i | ||
*ngIf="icon" | ||
aria-hidden="true" | ||
class="fa sky-icon" | ||
[ngClass]="classList()" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ import { | |
expect | ||
} from '@blackbaud/skyux-builder/runtime/testing/browser'; | ||
|
||
describe('Icon component', () => { | ||
fdescribe('Icon component', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missed an "f" 😉 |
||
let fixture: ComponentFixture<IconTestComponent>; | ||
let cmp: IconTestComponent; | ||
let element: HTMLElement; | ||
|
@@ -44,15 +44,25 @@ describe('Icon component', () => { | |
expect(element.querySelector('.sky-icon').classList.length).toBe(4); | ||
}); | ||
|
||
it('should display something other than circle', () => { | ||
it('should display a different icon with a different size and a fixedWidth', () => { | ||
cmp.icon = 'broom'; | ||
cmp.size = ''; | ||
cmp.size = '5x'; | ||
cmp.fixedWidth = true; | ||
fixture.detectChanges(); | ||
expect(cmp.icon).toBe('broom'); | ||
expect(element.querySelector('.sky-icon')).toHaveCssClass('fa-broom'); | ||
expect(element.querySelector('.sky-icon')).toHaveCssClass('fa-5x'); | ||
expect(element.querySelector('.sky-icon')).toHaveCssClass('fa-fw'); | ||
expect(element.querySelector('.sky-icon').classList.length).toBe(4); | ||
expect(element.querySelector('.sky-icon').classList.length).toBe(5); | ||
expect(element.querySelector('.sky-icon').getAttribute('aria-hidden')).toBe('true'); | ||
}); | ||
|
||
it('should show an icon without optional inputs', () => { | ||
cmp.icon = 'spinner'; | ||
cmp.size = undefined; | ||
cmp.fixedWidth = undefined; | ||
fixture.detectChanges(); | ||
expect(element.querySelector('.sky-icon')).toHaveCssClass('fa-spinner'); | ||
expect(element.querySelector('.sky-icon').classList.length).toBe(3); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alphabetical
<sky-icon
[fixedWidth]="fixedWidth"
[icon]="icon"
[size]="size">