mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 17:45:38 +01:00
Added Panel component. New color scheme.
This commit is contained in:
parent
a7dad20d8a
commit
5d2c1e27c2
13 changed files with 64 additions and 64 deletions
|
|
@ -11,11 +11,10 @@ import {
|
|||
} from '@umami/react-zen';
|
||||
import { Lucide, Icons } from '@/components/icons';
|
||||
import { useMessages, useTeamUrl } from '@/components/hooks';
|
||||
import type { SideNavProps } from '@umami/react-zen/SideNav';
|
||||
|
||||
export function Nav(props: SideNavProps) {
|
||||
export function Nav(props: any) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { renderTeamUrl } = useTeamUrl();
|
||||
const { renderTeamUrl, pathname } = useTeamUrl();
|
||||
const [isCollapsed, setCollapsed] = useState(false);
|
||||
|
||||
const links = [
|
||||
|
|
@ -47,7 +46,7 @@ export function Nav(props: SideNavProps) {
|
|||
].filter(n => n);
|
||||
|
||||
return (
|
||||
<SideNav {...props} isCollapsed={isCollapsed} variant="3" showBorder={false}>
|
||||
<SideNav {...props} isCollapsed={isCollapsed} variant="3" showBorder={true}>
|
||||
<SideNavSection>
|
||||
<SideNavHeader label="umami" icon={<Icons.Logo />} />
|
||||
</SideNavSection>
|
||||
|
|
@ -55,7 +54,7 @@ export function Nav(props: SideNavProps) {
|
|||
{links.map(({ href, label, icon }) => {
|
||||
return (
|
||||
<Link key={href} href={href}>
|
||||
<SideNavItem label={label} icon={icon} />
|
||||
<SideNavItem label={label} icon={icon} isSelected={pathname.startsWith(href)} />
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue