Merged PR 73: changed colors in sidebar

changed colors in sidebar
This commit is contained in:
Mouli Chand Birudugadda
2026-04-01 06:41:56 +00:00
committed by Kartik Datrika
6 changed files with 56 additions and 18 deletions

View File

@@ -150,7 +150,7 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
<aside
style={{ "--width": `${width}px` } as React.CSSProperties}
className={cx(
"flex h-full w-full max-w-full flex-col justify-between overflow-auto border-secondary bg-primary pt-4 shadow-xs transition-all duration-200 ease-linear md:border-r lg:w-(--width) lg:rounded-xl lg:border lg:pt-5",
"flex h-full w-full max-w-full flex-col justify-between overflow-auto bg-sidebar pt-4 shadow-xs transition-all duration-200 ease-linear lg:w-(--width) lg:pt-5",
)}
>
{/* Logo + collapse toggle */}
@@ -159,8 +159,8 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
<img src="/favicon-32.png" alt="Helix Engage" className="size-8 rounded-lg shrink-0" />
) : (
<div className="flex flex-col gap-1">
<span className="text-md font-bold text-primary">Helix Engage</span>
<span className="text-xs text-tertiary">Global Hospital &middot; {getRoleSubtitle(user.role)}</span>
<span className="text-md font-bold text-white">Helix Engage</span>
<span className="text-xs text-white opacity-70">Global Hospital &middot; {getRoleSubtitle(user.role)}</span>
</div>
)}
<button
@@ -177,7 +177,7 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
{navSections.map((group) => (
<li key={group.label}>
{!collapsed && (
<div className="px-5 pb-1">
<div className="px-5 pb-1 bg-sidebar">
<p className="text-xs font-bold text-quaternary uppercase">{group.label}</p>
</div>
)}
@@ -188,11 +188,19 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
<Link
to={item.href ?? '/'}
title={item.label}
style={
item.href !== activeUrl
? {
"--hover-bg": "var(--color-sidebar-nav-item-hover-bg)",
"--hover-text": "var(--color-sidebar-nav-item-hover-text)",
} as React.CSSProperties
: undefined
}
className={cx(
"flex size-10 items-center justify-center rounded-lg transition duration-100 ease-linear",
item.href === activeUrl
? "bg-active text-fg-brand-primary"
: "text-fg-quaternary hover:bg-primary_hover hover:text-fg-secondary",
: "text-fg-quaternary hover:bg-(--hover-bg) hover:text-(--hover-text)",
)}
>
{item.icon && <item.icon className="size-5" />}
@@ -221,7 +229,8 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
<button
onClick={handleSignOut}
title={`${user.name}\nSign out`}
className="rounded-lg p-1 hover:bg-primary_hover transition duration-100 ease-linear"
style={{ "--hover-bg": "var(--color-sidebar-nav-item-hover-bg)" } as React.CSSProperties}
className="rounded-lg p-1 hover:bg-(--hover-bg) transition duration-100 ease-linear"
>
<Avatar size="sm" initials={user.initials} status={avatarStatus} />
</button>
@@ -248,9 +257,9 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
return (
<>
<MobileNavigationHeader>{content}</MobileNavigationHeader>
<div className="hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex lg:py-1 lg:pl-1">{content}</div>
<div className="hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex">{content}</div>
<div
style={{ paddingLeft: width + 4 }}
style={{ paddingLeft: width }}
className="invisible hidden lg:sticky lg:top-0 lg:bottom-0 lg:left-0 lg:block transition-all duration-200 ease-linear"
/>