summaryrefslogtreecommitdiff
path: root/src/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 779f0d0..4c354f4 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -4,12 +4,28 @@ import 'tailwindcss/tailwind.css';
import Paper from './components/Paper';
import Header from './components/Header';
import Button from './components/Button';
+import ListTable from './components/ListTable';
const navigation = [
{ name: 'Главная', route: '/'},
{ name: 'Товары', route: '/products'}
];
+const fields = [
+ { key: '_id', label: 'ID' },
+ { key: 'name', label: 'Название' },
+ { key: 'type', label: 'Тип' },
+];
+
+const items = [
+ { _id: 1, name: 'Товар 1', type: 'Кондиционер' },
+ { _id: 2, name: 'Товар 2', type: 'Кондиционер' },
+ { _id: 3, name: 'Товар 3', type: 'Кондиционер' },
+ { _id: 4, name: 'Товар 4', type: 'Кондиционер' },
+ { _id: 5, name: 'Товар 5', type: 'Кондиционер' },
+ { _id: 6, name: 'Товар 6', type: 'Кондиционер' },
+];
+
const App: React.FC = () => (
<>
<Header navigation={navigation} />
@@ -19,6 +35,7 @@ const App: React.FC = () => (
<Button>Нажми меня</Button>
<Button variant="outlined">Отменить</Button>
</p>
+ <ListTable items={items} fields={fields} />
</Paper>
</>
);