mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 11:06:10 +00:00
created button component and moved header to commons folder
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
import "./App.css";
|
||||
import Header from "./components/header/header";
|
||||
import Header from "./commons/header/header";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
@@ -34,6 +35,7 @@
|
||||
text-transform: uppercase;
|
||||
|
||||
backface-visibility: hidden;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.heading-primary-main {
|
||||
@@ -1,5 +1,6 @@
|
||||
import "./header.css";
|
||||
import logoWhite from "../../commons/images/logo-white.png";
|
||||
import Button from "../../components/button/button";
|
||||
|
||||
function Header() {
|
||||
return (
|
||||
@@ -12,6 +13,7 @@ function Header() {
|
||||
<span className="heading-primary-main">Outdoors</span>
|
||||
<span className="heading-primary-sub">is where life happens</span>
|
||||
</h1>
|
||||
<Button text={"Discover our tours"} />
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
.btn:link,
|
||||
.btn:visited {
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
padding: 15px 40px;
|
||||
display: inline-block;
|
||||
border-radius: 100px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.btn-white {
|
||||
background-color: #fff;
|
||||
color: #777;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import "./button.css";
|
||||
|
||||
function Button(props) {
|
||||
return (
|
||||
<a href="#" className="btn btn-white">
|
||||
{props.text}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
export default Button;
|
||||
Reference in New Issue
Block a user