diff options
author | eug-vs <eug-vs@keemail.me> | 2021-03-16 01:38:02 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-03-16 01:38:02 +0300 |
commit | 6a200e57d4a0be0532587b9648ff8d58f97e91e8 (patch) | |
tree | 46595b176cd5a13250fbf389f8c290b49d16aa5f /src/containers | |
parent | 207dd8a47b69113f1013d7508a14d3048b3747d1 (diff) | |
download | commercel-ui-6a200e57d4a0be0532587b9648ff8d58f97e91e8.tar.gz |
feat: allow passing className to Page
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/Page.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/containers/Page.tsx b/src/containers/Page.tsx index c05ef4b..879d130 100644 --- a/src/containers/Page.tsx +++ b/src/containers/Page.tsx @@ -9,9 +9,10 @@ export interface Action extends ButtonProps { interface Props { title?: string; actions?: Action[]; + className?: string; } -const Page: React.FC<Props> = ({ title, actions, children }) => ( +const Page: React.FC<Props> = ({ title, actions, className, children }) => ( <Paper> <div className="mb-2 flex justify-between items-center"> <span className="text-2xl font-bold">{title}</span> @@ -19,7 +20,9 @@ const Page: React.FC<Props> = ({ title, actions, children }) => ( {actions?.map(action => (<Button {...action} key={action.name} size="sm">{action.name}</Button>))} </div> </div> - {children} + <div className={className}> + {children} + </div> </Paper> ); |