add TODOs to create props interfaces for components

This commit is contained in:
Sidney Alcantara
2019-09-22 23:49:48 +10:00
parent c4a1397650
commit 575e557ac7
14 changed files with 14 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ import {
} from "@material-ui/core";
import AddIcon from "@material-ui/icons/Add";
// TODO: Create an interface for props
export default function ColumnDialog(props: any) {
const { classes, columnName, updateColumn } = props;
const [open, setOpen] = React.useState(false);

View File

@@ -34,6 +34,7 @@ const useStyles = makeStyles(() =>
})
);
// TODO: Create an interface for props
export default function ColumnDrawer(props: any) {
const { addColumn, columns } = props;
const classes = useStyles();

View File

@@ -13,6 +13,7 @@ import {
Fab,
} from "@material-ui/core";
// TODO: Create an interface for props
export default function CreateTableDialog(props: any) {
const { classes, createTable } = props;
const [open, setOpen] = React.useState(false);

View File

@@ -2,6 +2,7 @@ import React from "react";
import { Checkbox } from "@material-ui/core";
// TODO: Create an interface for props
const CheckBox = (props: any) => {
const { columnData, cellData, cellActions, rowData, rowIndex } = props;
return (

View File

@@ -9,6 +9,7 @@ import {
DatePicker,
} from "@material-ui/pickers";
// TODO: Create an interface for props
const Date = (props: any) => {
const {
isFocusedCell,

View File

@@ -9,6 +9,7 @@ import {
DateTimePicker,
} from "@material-ui/pickers";
// TODO: Create an interface for props
const DateTime = (props: any) => {
const {
isFocusedCell,

View File

@@ -3,6 +3,7 @@ import { useDropzone } from "react-dropzone";
import useUploader from "../../hooks/useFiretable/useUploader";
// TODO: indecate state completion / error
// TODO: Create an interface for props
const Image = (props: any) => {
const { columnData, cellData, cellActions, rowData, rowIndex } = props;
const [uploaderState, upload] = useUploader();

View File

@@ -2,6 +2,7 @@ import React from "react";
import { TextField } from "@material-ui/core";
// TODO: Create an interface for props
const Number = (props: any) => {
const { isFocusedCell, cellData, cellActions } = props;
if (isFocusedCell)

View File

@@ -1,6 +1,7 @@
import React from "react";
import MuiRating from "@material-ui/lab/Rating";
// TODO: Create an interface for props
const Rating = (props: any) => {
const { columnData, cellData, cellActions, rowData, rowIndex } = props;
return (

View File

@@ -2,6 +2,7 @@ import React from "react";
import { TextField } from "@material-ui/core";
// TODO: Create an interface for props
const SimpleText = (props: any) => {
const { isFocusedCell, cellData, cellActions } = props;

View File

@@ -57,6 +57,7 @@ const useStyles = makeStyles(theme =>
})
);
// TODO: Create an interface for props
const Navigation = (props: any) => {
const router = useRouter();
const classes = useStyles();

View File

@@ -205,6 +205,7 @@ class MuiVirtualizedTable extends React.PureComponent<
const VirtualizedTable = withStyles(styles)(MuiVirtualizedTable);
// TODO: Create an interface for props
export default function Table(props: any) {
const { collection } = props;
const { tableState, tableActions } = useFiretable(collection);

View File

@@ -17,6 +17,7 @@ import Date from "./Fields/Date";
import DateTime from "./Fields/DateTime";
import Image from "./Fields/Image";
// TODO: Create an interface for props
const TableCell = (props: any) => {
const {
fieldType,

View File

@@ -33,6 +33,7 @@ const useStyles = makeStyles(() =>
})
);
// TODO: Create an interface for props
const TablesView = (props: any) => {
const [settings, createTable] = useSettings();
const tables = settings.tables;