Move theme selector to the header and improved about page and styling
This commit is contained in:
30
src/components/PageSection.js
Normal file
30
src/components/PageSection.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import React from "react";
|
||||
import styled, { css } from "styled-components";
|
||||
|
||||
export const Content = styled.div`
|
||||
${({ content }) =>
|
||||
content === PageSection.content.center &&
|
||||
css`
|
||||
max-width: 60rem;
|
||||
margin: 0 auto;
|
||||
// padding: 0.5em;
|
||||
`}
|
||||
`;
|
||||
|
||||
const contentPosition = {
|
||||
center: "center",
|
||||
stretch: "stretch"
|
||||
};
|
||||
|
||||
export const PageSection = ({ content, children, className } = { content: contentPosition.stretch }) => {
|
||||
return (
|
||||
<div className={className}>
|
||||
<Content content={content}>{children}</Content>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
PageSection.content = contentPosition;
|
||||
PageSection.Content = Content;
|
||||
|
||||
export default PageSection;
|
||||
Reference in New Issue
Block a user