diff options
Diffstat (limited to 'src/containers/Page.tsx')
-rw-r--r-- | src/containers/Page.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/containers/Page.tsx b/src/containers/Page.tsx index 0c8269e..f6ae814 100644 --- a/src/containers/Page.tsx +++ b/src/containers/Page.tsx @@ -1,10 +1,9 @@ import React from 'react'; import Paper from '../components/Paper'; -import Button from '../components/Button'; +import Button, { Props as ButtonProps } from '../components/Button'; -interface Action { +export interface Action extends ButtonProps { name: string; - route: string; } interface Props { @@ -16,7 +15,9 @@ const Page: React.FC<Props> = ({ title, actions, children }) => ( <Paper> <div className="mb-2 flex justify-between items-center"> <span className="text-2xl font-bold">{title}</span> - {actions?.map(action => (<Button size="sm" route={action.route}>{action.name}</Button>))} + <div> + {actions?.map(action => (<Button {...action} size="sm">{action.name}</Button>))} + </div> </div> {children} </Paper> |