Add header

This commit is contained in:
rui hildt 2020-07-22 15:57:37 +02:00
parent 1c336a7834
commit 689203761e
2 changed files with 28 additions and 8 deletions

View File

@ -1,20 +1,23 @@
import React from 'react';
import { Grommet } from 'grommet';
import { Header } from './Header';
const theme = {
global: {
font: {
family: 'Roboto',
size: '18px',
height: '20px',
},
},
global: {
font: {
family: 'Roboto',
size: '18px',
height: '20px',
},
},
};
function App() {
return (
<Grommet theme={theme}>
<h1>Spoti Search</h1>
<Header>
<h1>Spoti Search</h1>
</Header>
</Grommet>
);
}

17
src/components/Header.tsx Normal file
View File

@ -0,0 +1,17 @@
import React, { PropsWithChildren } from 'react';
import { Box } from 'grommet';
export const Header = (props: PropsWithChildren<{}>) => {
return (
<Box
tag='header'
direction='row'
align='center'
justify='center'
background='brand'
pad={{ left: 'medium', right: 'small', vertical: 'small' }}
style={{ zIndex: 1 }}
{...props}
/>
);
};