mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
optional open links in new tab
This commit is contained in:
parent
690a069dbd
commit
e049152347
@ -14,6 +14,7 @@ type route = {
|
|||||||
icon: JSX.Element;
|
icon: JSX.Element;
|
||||||
name: string;
|
name: string;
|
||||||
submenu?: route;
|
submenu?: route;
|
||||||
|
blank?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,6 +103,7 @@ export function SideBar({ routes, bottomRoutes }: { routes: route[], bottomRoute
|
|||||||
<SidebarSubmenu {...route} /> :
|
<SidebarSubmenu {...route} /> :
|
||||||
(<NavLink
|
(<NavLink
|
||||||
end
|
end
|
||||||
|
target={route.blank ? "_blank" : "_self"}
|
||||||
to={route.path}
|
to={route.path}
|
||||||
className={({ isActive }) => `${isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none'}`} onClick={() => {
|
className={({ isActive }) => `${isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none'}`} onClick={() => {
|
||||||
if (screen.width < 640 && !slim) instance.toggle();
|
if (screen.width < 640 && !slim) instance.toggle();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user