diff options
-rw-r--r-- | src/index.tsx | 9 | ||||
-rw-r--r-- | src/lib/Header/Header.tsx | 4 | ||||
-rw-r--r-- | src/lib/SmartList/SmartList.tsx | 2 | ||||
-rw-r--r-- | src/lib/Window/Window.tsx | 2 | ||||
-rw-r--r-- | src/lib/Window/WindowSurface.tsx | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/src/index.tsx b/src/index.tsx index 4e1f35f..7af6098 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,6 +13,11 @@ import { import icon from './assets/icon.svg'; +interface RenderPropTypes { + index: number; + style: React.CSSProperties; +} + const useStyles = makeStyles(theme => ({ window: { @@ -29,13 +34,13 @@ const headerContents = { 'another page': null, }; -const renderItem = ({ index, style }: any) => { +const renderItem: React.FC<RenderPropTypes> = ({ index, style}) => { return ( <Typography variant="h3" style={style} component="div"> {index} </Typography> ); }; -const App = () => { +const App: React.FC = () => { const classes = useStyles(); const [page, setPage] = useState('home'); diff --git a/src/lib/Header/Header.tsx b/src/lib/Header/Header.tsx index 7f3d35d..233eacb 100644 --- a/src/lib/Header/Header.tsx +++ b/src/lib/Header/Header.tsx @@ -23,7 +23,7 @@ interface PropTypes { setPage: (newPage: string) => void; } -const useStyles = makeStyles((theme: any) => ({ +const useStyles = makeStyles(theme => ({ root: { background: theme.palette.background.elevation2, color: theme.palette.text.primary, @@ -49,7 +49,7 @@ const useStyles = makeStyles((theme: any) => ({ const Header: React.FC<PropTypes> = ({ logo, contents, page, setPage }) => { const classes = useStyles(); - const handleChange = (event: React.ChangeEvent<{}>, newPage: string) => { + const handleChange = (event: React.ChangeEvent<{}>, newPage: string): void => { setPage(newPage); }; diff --git a/src/lib/SmartList/SmartList.tsx b/src/lib/SmartList/SmartList.tsx index c889719..22cd3b2 100644 --- a/src/lib/SmartList/SmartList.tsx +++ b/src/lib/SmartList/SmartList.tsx @@ -5,7 +5,7 @@ import AutoSizer from 'react-virtualized-auto-sizer'; interface RenderPropTypes { index: number; - style: any; + style: React.CSSProperties; } interface PropTypes { diff --git a/src/lib/Window/Window.tsx b/src/lib/Window/Window.tsx index ea8e264..6821593 100644 --- a/src/lib/Window/Window.tsx +++ b/src/lib/Window/Window.tsx @@ -12,7 +12,7 @@ interface PropTypes { } -const useStyles = makeStyles((theme: any) => ({ +const useStyles = makeStyles(theme => ({ header: { padding: theme.spacing(1, 0, 1, 2), background: theme.palette.background.elevation2, diff --git a/src/lib/Window/WindowSurface.tsx b/src/lib/Window/WindowSurface.tsx index 701a767..a65e398 100644 --- a/src/lib/Window/WindowSurface.tsx +++ b/src/lib/Window/WindowSurface.tsx @@ -11,7 +11,7 @@ interface PropTypes { } -const useStyles = makeStyles((theme: any) => ({ +const useStyles = makeStyles(theme => ({ surface: { position: 'absolute', display: 'flex', |