Add center component
This commit is contained in:
parent
c51abc3b74
commit
dc9b2ac04c
21
src/components/Center.tsx
Normal file
21
src/components/Center.tsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import { FunctionComponent } from 'react';
|
||||||
|
|
||||||
|
const Center: FunctionComponent = ({children}) => {
|
||||||
|
return (
|
||||||
|
<div className='center'>
|
||||||
|
{children}
|
||||||
|
<style jsx>{`
|
||||||
|
.center {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Center;
|
||||||
Loading…
Reference in New Issue
Block a user