From 9e66d5a5dd68eaa5b5b8b23ea2b75be49a1a7117 Mon Sep 17 00:00:00 2001 From: codevictory Date: Thu, 21 Oct 2021 00:47:12 +0300 Subject: [PATCH] Header to it's own component. --- src/App.css | 11 ----------- src/App.tsx | 6 ++---- src/components/header.tsx | 10 ++++++++++ src/styles/header.css | 10 ++++++++++ 4 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 src/components/header.tsx create mode 100644 src/styles/header.css diff --git a/src/App.css b/src/App.css index c4034ce..4931613 100644 --- a/src/App.css +++ b/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; -} diff --git a/src/App.tsx b/src/App.tsx index 14f88f5..669e5ba 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,10 @@ import './App.css'; +import { Header } from "./components/header" function App() { return (
-
-

Lintu ja Maslo

-

Elokuussa 2022

-
+
); } diff --git a/src/components/header.tsx b/src/components/header.tsx new file mode 100644 index 0000000..6ff49fd --- /dev/null +++ b/src/components/header.tsx @@ -0,0 +1,10 @@ +import "./../styles/header.css" + +export const Header = () => { + return ( +
+

Lintu ja Maslo

+

Elokuussa 2022

+
+ ) +} \ No newline at end of file diff --git a/src/styles/header.css b/src/styles/header.css new file mode 100644 index 0000000..924df6c --- /dev/null +++ b/src/styles/header.css @@ -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; +}