summaryrefslogtreecommitdiff
path: root/src/containers/Page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/Page.tsx')
-rw-r--r--src/containers/Page.tsx13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/containers/Page.tsx b/src/containers/Page.tsx
index 2fe54fa..d659510 100644
--- a/src/containers/Page.tsx
+++ b/src/containers/Page.tsx
@@ -1,8 +1,13 @@
import React from 'react';
import Paper from '../components/Paper';
import Button from '../components/Button';
-import { Action, Filter } from '../lib/ServiceContext';
-import { SelectBase } from '../components/Select';
+import { Action } from '../lib/ServiceContext';
+import { Option, SelectBase } from '../components/Select';
+import { Field } from '../components/ListTable';
+
+export interface Filter extends Field {
+ options?: Option[];
+}
interface Props {
title?: string;
@@ -19,8 +24,8 @@ const Page: React.FC<Props> = ({ title, actions, filters, className, children })
<div className={`${style} ${(actions?.length || 0) > 1 ? 'flex-col items-start' : 'flex-row items-center'}`}>
<span className="text-2xl font-bold">{title}</span>
<div className="flex">
- <div className="mr-6">
- {filters?.map(filter => (<SelectBase key={filter.field} options={filter.options} />))}
+ <div className="mr-6 flex">
+ {filters?.map(filter => (<SelectBase key={filter.key} options={filter.options || []} />))}
</div>
<div>
{actions?.map(action => (<Button {...action} key={action.name} size="sm">{action.name}</Button>))}