add type hints
This commit is contained in:
parent
5b3a051229
commit
6bf0c531ba
@ -1,21 +1,11 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"short_name": "crosski",
|
||||
"name": "Play crosski online!",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
|
@ -5,7 +5,7 @@ import Board from '../Board/Board';
|
||||
|
||||
import './App.css';
|
||||
|
||||
function App() {
|
||||
export default function App(): JSX.Element {
|
||||
return (
|
||||
<div className="App">
|
||||
<Logo />
|
||||
@ -13,5 +13,3 @@ function App() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
@ -13,8 +13,8 @@
|
||||
font-size: larger;
|
||||
padding: 20px;
|
||||
background: ghostwhite;
|
||||
border-radius: 25px;
|
||||
border-color: #E5E5EA;
|
||||
border-radius: 1rem;
|
||||
border-color: #e5e5ea;
|
||||
color: brown;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import './Board.css';
|
||||
|
||||
class Board extends Component {
|
||||
export default class Board extends React.Component {
|
||||
|
||||
static propTypes = {
|
||||
clickHandler: PropTypes.func,
|
||||
};
|
||||
|
||||
genSquares() {
|
||||
let squares = [];
|
||||
@ -22,12 +27,12 @@ class Board extends Component {
|
||||
return squares;
|
||||
}
|
||||
|
||||
onMouseDown() {
|
||||
console.log("down")
|
||||
onMouseMove() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
onMouseMove() {
|
||||
console.log("move")
|
||||
onMouseDown() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
render() {
|
||||
@ -42,5 +47,3 @@ class Board extends Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Board;
|
||||
|
@ -3,12 +3,10 @@ import React from 'react';
|
||||
import Wide from './crosski_wide.svg'
|
||||
import './Logo.css';
|
||||
|
||||
function Logo() {
|
||||
export default function Logo(): JSX.Element {
|
||||
return (
|
||||
<div className="Logo">
|
||||
<img alt="Logo" src={Wide} className="Logo-wide"/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Logo;
|
||||
|
@ -12,7 +12,6 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
@ -23,6 +22,7 @@
|
||||
"declaration": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"incremental": true
|
||||
},
|
||||
"include": [
|
||||
|
Loading…
Reference in New Issue
Block a user