Currently, I have a Navbar
setup with a conditional statement that displays the user-icon
if the userstatus
is true (indicating the user is signed in), otherwise it shows the signin
. My goal is to make it so that when I click on either the user-icon
or signin
, a drop-down menu appears. I plan on using this for a logout button later on. I'm having trouble figuring out how to achieve this functionality. While looking at the documentation on , I noticed that I can implement something similar but I want to use my own icon (glyphicon glyphicon-user
) instead of the standard rectangle box.
https://i.sstatic.net/BsOtL.png
- I want to achieve a design like the one shown below, but instead of using a
Dropdown button
, I want to incorporate theuser-icon
.
https://i.sstatic.net/ie0sh.png
If you have any suggestions or pointers, please share them with me.
-Code excerpt
<li>
<a className="active" href="/signin">
{userstatus ? (
<a className=" signin-icon glyphicon glyphicon-user"></a>
) : (
<a>SIGNIN</a>
)}
</a>
</li>