@heroicons/react/solid#UserCircleIcon TypeScript Examples
The following examples show how to use
@heroicons/react/solid#UserCircleIcon.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NavBar.tsx From server with MIT License | 6 votes |
DesktopNavBar = () => {
const history = useHistory()
const path = useLocation().pathname
return (
<div className="nav-bar-container nav-bar-top" onClick={() => {window.scrollTo({ top: 0, behavior: 'smooth'})}}>
<div
className={`nav-bar-button-container nav-bar-button-container-aligned ${handleNavItemActiveClass(path, "/")}`}
onClick={() => {
history.push('/')
}}
>
<HomeIcon />
<span className='nav-bar-button-text'>Home</span>
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-aligned ${handleNavItemActiveClass(path, "/users")}`}
onClick={() => {history.push('/users')}}
>
<UserGroupIcon />
<span className='nav-bar-button-text'>Users</span>
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-aligned ${handleNavItemActiveClass(path, "/profile")}`}
onClick={() => {history.push('/profile')}}
>
<UserCircleIcon />
<span className='nav-bar-button-text'>Profile</span>
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-aligned ${handleNavItemActiveClass(path, "/settings")}`}
onClick={() => {history.push('/settings')}}
>
<CogIcon />
<span className='nav-bar-button-text'>Settings</span>
</div>
</div>
)
}
Example #2
Source File: NavBar.tsx From server with MIT License | 5 votes |
MobileNavBar = () => {
const history = useHistory()
const path = useLocation().pathname
const hasNewNotifications = useAppSelector(state => state.notifications.notifications.filter(n => n.unread).length > 0)
return (
<div className="nav-bar-container nav-bar-bottom">
<div
className={`nav-bar-button-container nav-bar-button-container-spaced ${handleNavItemActiveClass(path, "/circles")}`}
onClick={() => {
history.push('/circles')
window.scrollTo({ top: 0, behavior: 'smooth'})
}}
>
<CirclesIcon />
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-spaced ${handleNavItemActiveClass(path, "/users")}`}
onClick={() => {
history.push('/users')
window.scrollTo({ top: 0, behavior: 'smooth'})
}}
>
<UserAddIcon />
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-spaced ${handleNavItemActiveClass(path, "/")}`}
onClick={() => {
history.push('/')
window.scrollTo({ top: 0, behavior: 'smooth'})
}}
>
<HomeIcon />
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-spaced ${handleNavItemActiveClass(path, "/notifications")}`}
onClick={() => {
history.push('/notifications')
window.scrollTo({ top: 0, behavior: 'smooth'})
}}
>
{hasNewNotifications && <div className='nav-bar-notification-indicator-wrapper'><div className='nav-bar-notification-indicator' /></div>}
<BellIcon />
</div>
<div
className={`nav-bar-button-container nav-bar-button-container-spaced ${handleNavItemActiveClass(path, "/profile")}`}
onClick={() => {
history.push('/profile')
window.scrollTo({ top: 0, behavior: 'smooth'})
}}
>
<UserCircleIcon />
</div>
</div>
)
}