Skip to content

Commit

Permalink
fix: Icon now longer returns error if type string not recognised
Browse files Browse the repository at this point in the history
fixes #42
  • Loading branch information
MildTomato committed Jan 8, 2021
1 parent d2087b8 commit d7be954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function Icon({ className, size, type, color, strokeWidth, ...props }: Props) {

const defaultSize = defaultSizes['large']
// @ts-ignore
const FeatherIcon = Icons[type]
const FeatherIcon = Icons[type] ? Icons[type] : Icons['Mail']

// const iconSize = typeof size === 'string' ? defaultSizes[contextSize] : 21
let iconSize: any = 21

// use contextSize of parent (via context hook) if one exists
if (contextSize) {
iconSize = contextSize
Expand Down

0 comments on commit d7be954

Please sign in to comment.