Header to it's own component.
This commit is contained in:
11
src/App.css
11
src/App.css
@@ -1,14 +1,3 @@
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import './App.css';
|
||||
import { Header } from "./components/header"
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<h1>Lintu ja Maslo</h1>
|
||||
<p><i>Elokuussa 2022</i></p>
|
||||
</header>
|
||||
<Header />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
10
src/components/header.tsx
Normal file
10
src/components/header.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import "./../styles/header.css"
|
||||
|
||||
export const Header = () => {
|
||||
return (
|
||||
<header className="App-header">
|
||||
<h1>Lintu ja Maslo</h1>
|
||||
<p><i>Elokuussa 2022</i></p>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
10
src/styles/header.css
Normal file
10
src/styles/header.css
Normal file
@@ -0,0 +1,10 @@
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
Reference in New Issue
Block a user