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'; interface Props { title?: string; actions?: Action[]; filters?: Filter[]; applyFilter?: (key: string, value: string) => void; className?: string; } const style = 'mb-2 flex justify-between md:flex-row md:items-center'; const Page: React.FC = ({ title, actions, filters, applyFilter, className, children }) => { const handleFilterChange = (key: string) => (event: React.ChangeEvent) => { if (applyFilter) applyFilter(key, event.target.value); }; return (
1 ? 'flex-col items-start' : 'flex-row items-center'}`}> {title}
{filters?.map(filter => ( ))}
{actions?.map(action => ())}
{children}
); }; export default Page;