cleanup prop types

This commit is contained in:
shams mosowi
2019-09-23 10:09:08 +10:00
parent eb57485d1c
commit 7e4ce1fb4c
5 changed files with 9 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ import { Checkbox } from "@material-ui/core";
// TODO: Create an interface for props
interface Props {
value: boolean | null;
row: any;
row: { ref: firebase.firestore.DocumentReference; id: string };
onSubmit: Function;
}

View File

@@ -13,7 +13,7 @@ import {
// TODO: Create an interface for props
interface Props {
value: firebase.firestore.Timestamp | null;
row: any;
row: { ref: firebase.firestore.DocumentReference; id: string };
onSubmit: Function;
fieldType: FieldType;
}

View File

@@ -2,19 +2,17 @@ import React, { useCallback, useState } from "react";
import { useDropzone } from "react-dropzone";
import useUploader from "../../hooks/useFiretable/useUploader";
import { FieldType } from '.';
import { FieldType } from ".";
// TODO: indicate state completion / error
// TODO: Create an interface for props
interface Props {
value: any;
row: any;
row: { ref: firebase.firestore.DocumentReference; id: string };
onSubmit: Function;
fieldType: FieldType;
}
const Image = (props: any) => {
const { columnData, cellData, cellActions, rowData, rowIndex } = props;
const [uploaderState, upload] = useUploader();

View File

@@ -4,7 +4,7 @@ import { TextField } from "@material-ui/core";
// TODO: Create an interface for props
const Number = (props: any) => {
const { value, cellActions } = props;
const { value } = props;
return (
<TextField
autoFocus

View File

@@ -9,12 +9,13 @@ import IconButton from "@material-ui/core/IconButton";
import Button from "@material-ui/core/Button";
import EditIcon from "@material-ui/icons/Edit";
import HeaderPopper from "./HeaderPopper";
import { FieldType } from "../Fields";
import { FieldType, getFieldIcon } from "../Fields";
import Date from "../Fields/Date";
import Rating from "../Fields/Rating";
import CheckBox from "../Fields/CheckBox";
import UrlLink from "../Fields/UrlLink";
const useStyles = makeStyles(Theme =>
createStyles({
typography: {
@@ -110,7 +111,7 @@ function Table(props: any) {
fromRowData.ref.update(updated);
};
const onCellSelected = (args: any) => {
handleCloseHeader();
// handleCloseHeader();
console.log(args);
};
const headerRenderer = (props: any) => {
@@ -129,6 +130,7 @@ function Table(props: any) {
onClick={handleClick(props)}
aria-label="edit"
>
{getFieldIcon(props.column.type)}
{props.column.name} <EditIcon />
</Button>
</div>