File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ import clsx from 'clsx'
2+
13import { Link } from '@/components/common/button'
24import { Container } from '@/components/common/containers'
35import { Logo } from '@/components/common/logo'
@@ -14,6 +16,7 @@ const headerTabs = [
1416type HeaderProps = {
1517 isAuthenticated : boolean
1618 user : User | null
19+ currentPage ?: string
1720}
1821
1922const renderUserMenu = ( isAuthenticated : boolean , user : User | null ) => {
@@ -34,6 +37,7 @@ const renderUserMenu = (isAuthenticated: boolean, user: User | null) => {
3437export const Header = ( {
3538 isAuthenticated,
3639 user = null ,
40+ currentPage = '/' ,
3741} : HeaderProps ) : JSX . Element => {
3842 return (
3943 < header className = 'flex w-full justify-center' >
@@ -46,7 +50,9 @@ export const Header = ({
4650 href = { headerTab . link }
4751 variant = 'text'
4852 size = 'lg'
49- className = 'w-118'
53+ className = { clsx ( 'w-118 hover:bg-gray-100' , {
54+ 'text-primary-normal' : currentPage === headerTab . link ,
55+ } ) }
5056 key = { headerTab . label }
5157 >
5258 { headerTab . label }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export const Default: StoryObj = {
1414 args : {
1515 isAuthenticated : false ,
1616 user : null ,
17+ currentPage : '/project' ,
1718 } ,
1819}
1920export const WithUserMenu : StoryObj = {
@@ -24,11 +25,13 @@ export const WithUserMenu: StoryObj = {
2425 name : 'Alexander' ,
2526 imageUrl : 'https://picsum.photos/250/250' ,
2627 } ,
28+ currentPage : '/portfolio' ,
2729 } ,
2830}
2931export const LoggedInWithoutUser : StoryObj = {
3032 args : {
3133 isAuthenticated : true ,
3234 user : null ,
35+ currentPage : '/team' ,
3336 } ,
3437}
You can’t perform that action at this time.
0 commit comments