summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-16 01:38:02 +0300
committereug-vs <eug-vs@keemail.me>2021-03-16 01:38:02 +0300
commit6a200e57d4a0be0532587b9648ff8d58f97e91e8 (patch)
tree46595b176cd5a13250fbf389f8c290b49d16aa5f
parent207dd8a47b69113f1013d7508a14d3048b3747d1 (diff)
downloadcommercel-ui-6a200e57d4a0be0532587b9648ff8d58f97e91e8.tar.gz
feat: allow passing className to Page
-rw-r--r--src/containers/Page.tsx7
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>
);