From a4a1c456e0788ca52261efb38ff3998710a42a59 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 17 Apr 2021 13:08:48 +0300 Subject: feat: add Filters to Page --- src/containers/Page.tsx | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/containers/Page.tsx') diff --git a/src/containers/Page.tsx b/src/containers/Page.tsx index ae9e231..2fe54fa 100644 --- a/src/containers/Page.tsx +++ b/src/containers/Page.tsx @@ -1,28 +1,37 @@ import React from 'react'; import Paper from '../components/Paper'; import Button from '../components/Button'; -import { Action } from '../lib/ServiceContext'; +import { Action, Filter } from '../lib/ServiceContext'; +import { SelectBase } from '../components/Select'; interface Props { title?: string; actions?: Action[]; + filters?: Filter[]; className?: string; } const style = 'mb-2 flex justify-between md:flex-row md:items-center'; -const Page: React.FC = ({ title, actions, className, children }) => ( - -
1 ? 'flex-col items-start' : 'flex-row items-center'}`}> - {title} -
- {actions?.map(action => ())} +const Page: React.FC = ({ title, actions, filters, className, children }) => { + return ( + +
1 ? 'flex-col items-start' : 'flex-row items-center'}`}> + {title} +
+
+ {filters?.map(filter => ())} +
+
+ {actions?.map(action => ())} +
+
-
-
- {children} -
- -); +
+ {children} +
+ + ); +}; export default Page; -- cgit v1.2.3