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

Commit

Permalink
feat(icon): add billing icon (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpondoc committed Dec 26, 2020
1 parent a68a280 commit b81d9d9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const iconMap = {
'appointment-add': 'calendar-plus',
'appointment-remove': 'calendar-minus',
calendar: 'calendar-alt',
billing: 'file-invoice-dollar',
dashboard: 'columns',
'down-arrow': 'chevron-down',
edit: 'edit',
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type IconType =
| 'appointment'
| 'appointment-add'
| 'appointment-remove'
| 'billing'
| 'calendar'
| 'dashboard'
| 'down-arrow'
Expand Down
3 changes: 3 additions & 0 deletions stories/icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ storiesOf('Icons', module)
<span>Remove Apointment: </span>
<Icon icon="appointment-remove" />
<br />
<span>Billing: </span>
<Icon icon="billing" />
<br />
<span>Calendar: </span>
<Icon icon="calendar" />
<br />
Expand Down
7 changes: 7 additions & 0 deletions test/icon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ describe('Icon', () => {
expect(removeAppointmentFontAwesomeIcon.props().icon).toStrictEqual(['fas', 'calendar-minus'])
})

it('Billing Icon renders itself without crashing', () => {
const billingIconWrapper = shallow(<Icon icon="billing" />)
const fontAwesomeIcon = billingIconWrapper.find(FontAwesomeIcon)
expect(fontAwesomeIcon).toHaveLength(1)
expect(fontAwesomeIcon.props().icon).toStrictEqual(['fas', 'file-invoice-dollar'])
})

it('Calendar Icon renders itself without crashing', () => {
const calendarIconWrapper = shallow(<Icon icon="calendar" />)
const fontAwesomeIcon = calendarIconWrapper.find(FontAwesomeIcon)
Expand Down

0 comments on commit b81d9d9

Please sign in to comment.