From 94ba725ccaf71e4a99c673afb61110649d802dd9 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 23 Apr 2019 22:47:07 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=A8=E3=81=97=E3=81=A6=E5=88=87=E3=82=8A?= =?UTF-8?q?=E5=87=BA=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/MainTheme.tsx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/styles/MainTheme.tsx b/styles/MainTheme.tsx index 7d4879b..06ce16f 100644 --- a/styles/MainTheme.tsx +++ b/styles/MainTheme.tsx @@ -43,17 +43,23 @@ export const components = { ) }; -const useStyles = makeStyles({ - container: { - padding: [8, 3, 1].map(n => `${n * theme.spacing.unit}px`).join(" "), - [theme.breakpoints.up("sm")]: { - padding: [9, 4, 1].map(n => `${n * theme.spacing.unit}px`).join(" ") +export const Container: React.FC<{}> = ({ children }) => { + const classes = makeStyles({ + root: { + padding: [8, 3, 1].map(n => `${theme.spacing.unit * n}px`).join(" "), + [theme.breakpoints.up("sm")]: { + padding: [9, 4, 1].map(n => `${theme.spacing.unit * n}px`).join(" ") + } } - } -}); + })(); + return ( + + {children} + + ); +}; const MainTheme: React.FC<{}> = ({ children }) => { - const classes = useStyles(); return ( @@ -71,9 +77,7 @@ const MainTheme: React.FC<{}> = ({ children }) => { - - {children} - + {children}