mancala/frontend/src/components/PageContainer.tsx

25 lines
698 B
TypeScript
Raw Normal View History

2022-07-13 22:39:01 +03:00
import * as React from "react";
import { FunctionComponent } from "react";
import { Theme } from "@mancala/core";
2022-07-13 22:39:01 +03:00
2022-07-14 22:38:33 +03:00
const PageContainer: FunctionComponent<{ theme: Theme }> = (props) => {
2022-07-13 22:39:01 +03:00
return (
<div style={{
background: props.theme?.background,
}}>
2022-07-14 22:38:33 +03:00
<style jsx>{`
div {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
min-height: 400px;
2022-09-03 22:19:28 +03:00
transition: background-color 0.5s;
2022-07-14 22:38:33 +03:00
}
`}</style>
2022-07-13 22:39:01 +03:00
{props.children}
</div>
);
}
export default PageContainer;