Skip to content

Commit

Permalink
cleaning and ready deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
bregydoc committed Aug 17, 2020
1 parent dfd26ce commit b597fde
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 187 deletions.
6 changes: 3 additions & 3 deletions components/atoms/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import React, { FC } from "react";
import icons from "./icons";

interface Props {
interface IconProps {
name: string;
color?: string;
size?: number;
checkColor?: string;
}

const Icon: FC<Props> = (props) => {
const Icon: FC<IconProps> = (props: IconProps) => {
const { name, color, size, checkColor } = props;
const icon = icons.find((icon) => icon.name === name);

if (icon) {
return icon.code(color, size, checkColor);
return icon.code({ color, size, checkColor });
} else {
return <span>Icon not found!</span>;
}
Expand Down
Loading

0 comments on commit b597fde

Please sign in to comment.