(item: SidebarItem, currentRouteName: string)
| 56 | // --------------------------------------------------------------------------- |
| 57 | |
| 58 | function getItemClass(item: SidebarItem, currentRouteName: string): string[] { |
| 59 | const isActive = |
| 60 | item.path === currentRouteName || |
| 61 | currentRouteName.startsWith(`${item.path}.`); |
| 62 | if (isActive) { |
| 63 | return ["router-link-active", "bg-link-hover"]; |
| 64 | } |
| 65 | return []; |
| 66 | } |
| 67 | |
| 68 | // --------------------------------------------------------------------------- |
| 69 | // Sidebar item list builder |
no outgoing calls
no test coverage detected