forked from sombochea/verdaccio-ui
fix: type lint for login
This commit is contained in:
@@ -67,7 +67,7 @@ const Icon: React.FC<Props> = ({ className, name, size = 'sm', img = false, poin
|
||||
// @ts-ignore
|
||||
const title = capitalize(name);
|
||||
return img ? (
|
||||
<ImgWrapper className={className} name={name} pointer={pointer} size={size} title={title} {...props}>
|
||||
<ImgWrapper className={className} pointer={pointer} size={size} title={title} {...props}>
|
||||
<Img alt={title} src={Icons[name]} />
|
||||
</ImgWrapper>
|
||||
) : (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import styled, { css } from 'react-emotion';
|
||||
|
||||
const getSize = (size?: 'md' | 'sm') => {
|
||||
const getSize = (size: 'md' | 'sm' | string): string => {
|
||||
switch (size) {
|
||||
case 'md':
|
||||
return `
|
||||
@@ -15,7 +15,7 @@ const getSize = (size?: 'md' | 'sm') => {
|
||||
}
|
||||
};
|
||||
|
||||
const commonStyle = ({ size = 'sm', pointer, modifiers }: any) => css`
|
||||
const commonStyle = ({ size = 'sm' as 'md' | 'sm' | string, pointer, modifiers = null }): string => css`
|
||||
&& {
|
||||
display: inline-block;
|
||||
cursor: ${pointer ? 'pointer' : 'default'};
|
||||
|
||||
Reference in New Issue
Block a user