Add header
This commit is contained in:
parent
1c336a7834
commit
689203761e
@ -1,20 +1,23 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Grommet } from 'grommet';
|
import { Grommet } from 'grommet';
|
||||||
|
import { Header } from './Header';
|
||||||
|
|
||||||
const theme = {
|
const theme = {
|
||||||
global: {
|
global: {
|
||||||
font: {
|
font: {
|
||||||
family: 'Roboto',
|
family: 'Roboto',
|
||||||
size: '18px',
|
size: '18px',
|
||||||
height: '20px',
|
height: '20px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<Grommet theme={theme}>
|
<Grommet theme={theme}>
|
||||||
<h1>Spoti Search</h1>
|
<Header>
|
||||||
|
<h1>Spoti Search</h1>
|
||||||
|
</Header>
|
||||||
</Grommet>
|
</Grommet>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
17
src/components/Header.tsx
Normal file
17
src/components/Header.tsx
Normal 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}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user