Skip to content

Commit

Permalink
[UI] Theme Toggle
Browse files Browse the repository at this point in the history
Signed-off-by: shashank-kavli <[email protected]>
  • Loading branch information
shashank-kavli authored Sep 28, 2023
1 parent f242a09 commit d49ea2b
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions site/src/components/Navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,24 @@ function Navigation({theme, toggleTheme, showSignUpButton}) {
<Header>
<nav className={scroll ? "scrolled" : ""}>
<img className="logo" src={Logo} alt="Meshery Logo" />
<div className="btn-container">
<div className="container">
<Toggle theme={theme} toggleTheme={toggleTheme} />
{showSignUpButton && <a href="#signup-form" className="signup-btn" role="button">Sign Up</a>}
{/* <a href="https://playground.meshery.io" className="login-btn" role="button">Login</a> */}
</div>
<div className="dropdown_btn" onClick={handleNavOpen}>
<Toggle theme={theme} toggleTheme={toggleTheme} />
{openNav ?
(<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="hamburger-icon">
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>)
: (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="hamburger-icon" >
<path strokeLinecap="round" strokeLinejoin="round" d="M3.75 9h16.5m-16.5 6.75h16.5" />
</svg>)}
<div className="btn-container">
{showSignUpButton && <a href="#signup-form" className="signup-btn" role="button">Sign Up</a>}
{/* <a href="https://playground.meshery.io" className="login-btn" role="button">Login</a> */}
</div>
<div className="dropdown_btn" onClick={handleNavOpen}>
{openNav ?
(<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="hamburger-icon">
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>)
: (<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="hamburger-icon" >
<path strokeLinecap="round" strokeLinejoin="round" d="M3.75 9h16.5m-16.5 6.75h16.5" />
</svg>)}
</div>
</div>
</nav>
<div className={openNav ? "dropdown_menu_opened" : "dropdown_menu_closed"}>
{/* <div className="mode-btn">
<Toggle theme={theme} toggleTheme={toggleTheme} />
</div> */}
<div className="action-btns">
<a href="#signup-form" className="signup-btn" role="button">Sign Up</a>
{/* <a href="https://demo.meshery.io" className="login-btn" role="button">Login</a> */}
Expand Down

0 comments on commit d49ea2b

Please sign in to comment.