mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
20 lines
467 B
TypeScript
20 lines
467 B
TypeScript
import { Text, List, ListItem } from '@umami/react-zen';
|
|
|
|
export interface MenuNavProps {
|
|
items: any[];
|
|
selectedKey?: string;
|
|
}
|
|
|
|
export function SideBar({ items, selectedKey }: MenuNavProps) {
|
|
return (
|
|
<List>
|
|
{items.map(({ key, label, url }) => {
|
|
return (
|
|
<ListItem key={key} href={url}>
|
|
<Text weight={key === selectedKey ? 'bold' : 'regular'}>{label}</Text>
|
|
</ListItem>
|
|
);
|
|
})}
|
|
</List>
|
|
);
|
|
}
|