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

fix: type lint for login

This commit is contained in:
Griffithtp
2019-06-23 22:44:53 +01:00
parent 116055c5d1
commit 91e603ef21
7 changed files with 77 additions and 61 deletions

View File

@@ -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'};