File tree Expand file tree Collapse file tree 2 files changed +36
-10
lines changed
Expand file tree Collapse file tree 2 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 171171 @apply bg-red-500/20! text-red-500!;
172172 }
173173
174+ /* Header Component Utilities */
175+ header {
176+ @apply border-b border-dark-400 h-20;
177+
178+ .inner {
179+ @apply flex justify-between items-center h-full;
180+
181+ a {
182+ @apply mb-0;
183+ }
184+
185+ nav {
186+ @apply flex h-full items-center;
187+
188+ .nav-link {
189+ @apply px-6 py-5 flex items-center transition-all hover:text-white font-medium h-full text-purple-100 cursor-pointer;
190+ }
191+
192+ .nav-link .is-active {
193+ @apply text-white;
194+ }
195+
196+ .nav-link .is-home {
197+ @apply max-sm:hidden;
198+ }
199+ }
200+ }
201+ }
202+
174203 /* CandlestickChart Styles */
175204 # candlestick-chart {
176205 @apply p-3 mt-5 rounded-lg bg-dark-500;
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ export const Header = ({ trendingCoins = [] }: HeaderProps) => {
1111 const pathname = usePathname ( ) ;
1212
1313 return (
14- < header className = 'border-b border-dark-400 h-20' >
15- < div className = 'container flex justify-between items-center h-full ' >
14+ < header >
15+ < div className = 'main- container inner ' >
1616 < Link href = '/' >
1717 < Image
1818 src = '/assets/logo.svg'
@@ -22,7 +22,7 @@ export const Header = ({ trendingCoins = [] }: HeaderProps) => {
2222 />
2323 </ Link >
2424
25- < nav className = 'flex h-full items-center' >
25+ < nav >
2626 { navItems . map ( ( item ) => {
2727 const isActive = pathname === item . href ;
2828
@@ -39,13 +39,10 @@ export const Header = ({ trendingCoins = [] }: HeaderProps) => {
3939 < Link
4040 key = { item . label }
4141 href = { item . href }
42- className = { cn (
43- 'px-6 py-5 flex items-center transition-all hover:text-white font-medium h-full text-purple-100 cursor-pointer' ,
44- {
45- 'text-white' : isActive ,
46- 'max-sm:hidden' : item . label === 'Home' ,
47- }
48- ) }
42+ className = { cn ( 'nav-link' , {
43+ 'is-active' : isActive ,
44+ 'is-home' : item . label === 'Home' ,
45+ } ) }
4946 >
5047 { item . label }
5148 </ Link >
You can’t perform that action at this time.
0 commit comments