1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-19 01:25:51 +07:00

fix: updated type to fix unit test

This commit is contained in:
Griffithtp
2019-06-25 23:29:53 +01:00
parent 2f28ade710
commit 7cab3f289e
7 changed files with 42 additions and 23 deletions

View File

@@ -61,14 +61,14 @@ export interface Props {
size?: Breakpoint;
pointer?: boolean;
img?: boolean;
modifiers?: null | undefined;
// modifiers?: null | undefined;
}
const Icon: React.FC<Props> = ({ className, name, size = 'sm', img = false, pointer = false, ...props }) => {
// @ts-ignore
const title = capitalize(name);
return img ? (
<ImgWrapper className={className} pointer={pointer} size={size} title={title} {...props}>
<ImgWrapper className={className} name={name} pointer={pointer} size={size} title={title} {...props}>
<Img alt={title} src={Icons[name]} />
</ImgWrapper>
) : (