mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:39:45 +00:00
Переделан Навбар, логотип теперь является ссылкой на главную страницу
This commit is contained in:
1 parent
46aab981dd
commit
3d01506f91
2 files changed
+19
-10
No files matched your search
@@ -1,16 +1,22 @@
|
||||
import { NavLink } from "react-router-dom";
|
||||
import { Children } from "react";
|
||||
|
||||
function NavbarLink({ link }) {
|
||||
function NavbarLink({ link, children }) {
|
||||
return (
|
||||
<NavLink
|
||||
className={({ isActive, isPending }) =>
|
||||
`nav-link ${isActive ? 'active' : isPending ? 'disabled' : ''
|
||||
}`
|
||||
}
|
||||
to={ link.to }
|
||||
target={ link.newTab && '_blank' }
|
||||
to={link.to}
|
||||
target={link.newTab && '_blank'}
|
||||
>
|
||||
{ link.text }
|
||||
{link.text}
|
||||
{Children.map(children, (child) => (
|
||||
<>
|
||||
{child}
|
||||
</>
|
||||
))}
|
||||
</NavLink >
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user