mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Implemented expanded view in dialog.
This commit is contained in:
parent
0b4851125d
commit
4e25c07160
9 changed files with 136 additions and 104 deletions
|
|
@ -15,9 +15,16 @@ export interface SideMenuProps {
|
|||
title?: string;
|
||||
selectedKey?: string;
|
||||
allowMinimize?: boolean;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export function SideMenu({ items, title, selectedKey, allowMinimize, children }: SideMenuProps) {
|
||||
export function SideMenu({
|
||||
items = [],
|
||||
title,
|
||||
selectedKey,
|
||||
allowMinimize,
|
||||
children,
|
||||
}: SideMenuProps) {
|
||||
return (
|
||||
<Column
|
||||
gap
|
||||
|
|
@ -36,7 +43,7 @@ export function SideMenu({ items, title, selectedKey, allowMinimize, children }:
|
|||
</Row>
|
||||
)}
|
||||
<NavMenu muteItems={false} gap="6">
|
||||
{items.map(({ label, items }) => {
|
||||
{items?.map(({ label, items }) => {
|
||||
return (
|
||||
<NavMenuGroup
|
||||
title={label}
|
||||
|
|
@ -45,7 +52,7 @@ export function SideMenu({ items, title, selectedKey, allowMinimize, children }:
|
|||
allowMinimize={allowMinimize}
|
||||
marginBottom="3"
|
||||
>
|
||||
{items.map(({ id, label, icon, path }) => {
|
||||
{items?.map(({ id, label, icon, path }) => {
|
||||
const isSelected = selectedKey === id;
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue