Layout: replace div with main

This commit is contained in:
Chika 2022-04-21 00:25:07 +03:00
parent 7851fbbbc8
commit 126a462c0d

View File

@ -1,9 +1,9 @@
import styled from 'styled-components';
import { Box, Flex } from 'UIKit/grid';
import { Flex } from 'UIKit/grid';
import { min } from 'UIKit/mq';
import Header from './Header';
const ContentWrapper = styled(Box)`
const Main = styled.main`
${min('laptop')} {
margin: 3px 8px;
}
@ -15,11 +15,11 @@ const ContentWrapper = styled(Box)`
}
`;
const Layout = ({ children }) => (
<Flex flexDirection="column">
<Header />
<ContentWrapper>{children}</ContentWrapper>
</Flex>
);
export default Layout;
export default function Layout({ children }) {
return (
<Flex flexDirection="column">
<Header />
<Main>{children}</Main>
</Flex>
);
}