Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build Header UI #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 9 additions & 32 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,19 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}

.card {
padding: 2em;
padding: 2em;
}

.read-the-docs {
color: #888;
color: #888;
}
25 changes: 3 additions & 22 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
import { useState } from "react"
import reactLogo from "./assets/react.svg"

Check failure on line 2 in src/App.jsx

View workflow job for this annotation

GitHub Actions / build

'reactLogo' is defined but never used
import viteLogo from "/vite.svg"

Check failure on line 3 in src/App.jsx

View workflow job for this annotation

GitHub Actions / build

'viteLogo' is defined but never used
import "./App.css"
import Header from "./components/Header/Header"

function App() {
const [count, setCount] = useState(0)

Check failure on line 8 in src/App.jsx

View workflow job for this annotation

GitHub Actions / build

'count' is assigned a value but never used

Check failure on line 8 in src/App.jsx

View workflow job for this annotation

GitHub Actions / build

'setCount' is assigned a value but never used

return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>

<Header />
</>
)
}

export default App
export default App
Binary file added src/assets/Stake_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import logo from "../../assets/Stake_logo.png"

const Header = () => {
return (
<header className="bg-[#1a2c38] flex justify-between items-center max-sm:px-4 px-10 md:px-24 lg:px-48 py-2">
<div className="logo">
<img src={logo} alt="" className="invert max-w-16 max-w-[400px]:w-10" />
</div>
<div className="btns">
<button className="text-white">Sign In</button>
<button className="bg-[#1375e1] text-white px-5 ml-5 py-3 rounded-md text-sm">
Register
</button>
</div>
</header>
)
}

export default Header
Loading