update webpack, update packages, dev experience

update webpack, clasp, client code, eslint, prettier, readme, packages to latest
This commit is contained in:
Elisha Nuchi
2020-05-03 05:12:50 -04:00
parent f898046c06
commit 0ea874e8b4
30 changed files with 1978 additions and 2851 deletions
+31
View File
@@ -0,0 +1,31 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
const FormInput = ({ newSheetFormHandler }) => {
const [text, setText] = useState('');
const handleChange = event => setText(event.target.value);
const handleSubmit = event => {
event.preventDefault();
if (text.length === 0) return;
newSheetFormHandler(event, text);
setText('');
};
return (
<div className="formBlock">
<span>Add a sheet: </span>
<form onSubmit={handleSubmit}>
<input onChange={handleChange} value={text} />
</form>
</div>
);
};
export default FormInput;
FormInput.propTypes = {
newSheetFormHandler: PropTypes.func,
};