Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit e8f57cf

Browse files
authored
Merge pull request #671 from cpondoc/add-inventory
Add inventory icon
2 parents a03a702 + 4fc35d2 commit e8f57cf

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

src/components/Icon/Icon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const iconMap = {
1818
edit: 'edit',
1919
image: 'camera',
2020
incident: 'file-alt',
21+
inventory: 'boxes',
2122
lab: 'microscope',
2223
'left-arrow': 'chevron-left',
2324
logout: 'sign-out-alt',

src/components/Icon/interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type IconType =
1111
| 'edit'
1212
| 'image'
1313
| 'incident'
14+
| 'inventory'
1415
| 'lab'
1516
| 'left-arrow'
1617
| 'logout'

stories/icons.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ storiesOf('Icons', module)
4545
<span>Incident: </span>
4646
<Icon icon="incident" />
4747
<br />
48+
<span>Inventory: </span>
49+
<Icon icon="inventory" />
50+
<br />
4851
<span>Lab: </span>
4952
<Icon icon="lab" />
5053
<br />

test/icon.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ describe('Icon', () => {
7979
expect(fontAwesomeIcon.props().icon).toStrictEqual(['fas', 'file-alt'])
8080
})
8181

82+
it('Inventory Icon renders itself without crashing', () => {
83+
const inventoryIconWrapper = shallow(<Icon icon="inventory" />)
84+
const fontAwesomeIcon = inventoryIconWrapper.find(FontAwesomeIcon)
85+
expect(fontAwesomeIcon).toHaveLength(1)
86+
expect(fontAwesomeIcon.props().icon).toStrictEqual(['fas', 'boxes'])
87+
})
88+
8289
it('Lab Icon renders itself without crashing', () => {
8390
const labIconWrapper = shallow(<Icon icon="lab" />)
8491
const fontAwesomeIcon = labIconWrapper.find(FontAwesomeIcon)

0 commit comments

Comments
 (0)