summaryrefslogtreecommitdiff
path: root/src/components/DataTable.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-14 03:03:12 +0300
committereug-vs <eug-vs@keemail.me>2021-03-14 03:03:12 +0300
commite1fc8ea5904de90f94d3f63287555c75067846ac (patch)
tree0046cb821cba9153a202ab7e21f291b69bafe926 /src/components/DataTable.tsx
parent64a537425a05a15ecfac3bf314735876dbbd8ed7 (diff)
downloadcommercel-ui-e1fc8ea5904de90f94d3f63287555c75067846ac.tar.gz
feat: add Page component
Diffstat (limited to 'src/components/DataTable.tsx')
-rw-r--r--src/components/DataTable.tsx30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/components/DataTable.tsx b/src/components/DataTable.tsx
deleted file mode 100644
index e005454..0000000
--- a/src/components/DataTable.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react';
-import ListTable from './ListTable';
-import Button from './Button';
-
-interface Field {
- key: string;
- label: string;
-}
-
-interface Props {
- title: string;
- items?: any[];
- fields: Field[];
- handleRowClick?: (index: number) => void;
-}
-
-const DataTable: React.FC<Props> = ({ title, items = [], fields, handleRowClick = () => {} }) => {
- return (
- <>
- <div className="mb-2 flex justify-between items-center">
- <span className="text-2xl font-bold">{title}</span>
- <Button size="sm">Добавить</Button>
- </div>
- <ListTable items={items} fields={fields} handleRowClick={handleRowClick} />
- {items.length === 0 && <div className="text-center p-6">No data</div>}
- </>
- );
-};
-
-export default DataTable;