Skip to content

Commit

Permalink
fix: icon type
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 11, 2021
1 parent df28504 commit 7bb8dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/stories/src/stories/VariantButton/VariantButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const paddings: Record<SizeVariants, string> = {
medium: `10px 20px`,
large: `15px 30px`,
};
const variant_icons: Record<ButtonIconType, typeof SearchIcon> = {
const variant_icons: Record<ButtonIconType, typeof SearchIcon | null> = {
none: null,
search: SearchIcon,
'left-arrow': ArrowLeftIcon,
Expand Down Expand Up @@ -116,7 +116,7 @@ export const VariantButton: FC<VariantButtonProps> = ({
iconSide = 'left',
padding = 'medium',
isPrimary = false,
icon,
icon = 'none',
}) => {
const Icon = variant_icons[icon];
const finalVariant = isPrimary ? 'primary' : variant;
Expand Down

0 comments on commit 7bb8dc8

Please sign in to comment.