summaryrefslogtreecommitdiffstats
path: root/components/Layout/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/Layout/index.tsx')
-rw-r--r--components/Layout/index.tsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/components/Layout/index.tsx b/components/Layout/index.tsx
new file mode 100644
index 0000000..4ed7762
--- /dev/null
+++ b/components/Layout/index.tsx
@@ -0,0 +1,25 @@
+import React from 'react';
+import classes from './layout.module.css';
+
+type PropType = {
+ style?: React.CSSProperties;
+ left?: React.ReactChild | React.ReactChildren;
+ right?: React.ReactChild | React.ReactChildren;
+ children: React.ReactNode | React.ReactNodeArray;
+};
+
+export function Layout(props: PropType) {
+ return (
+ <div className={classes.wrapper} style={props.style}>
+ <aside>{props.left}</aside>
+ <main>{props.children}</main>
+ <aside>{props.right}</aside>
+ </div>
+ );
+}
+
+Layout.defaultProps = {
+ left: 'left column',
+ right: 'right column',
+ style: {},
+};