diff --git a/web/ASC.Web.Common/src/components/Layout/index.js b/web/ASC.Web.Common/src/components/Layout/index.js index 29acaf80dc..54a97d6c66 100644 --- a/web/ASC.Web.Common/src/components/Layout/index.js +++ b/web/ASC.Web.Common/src/components/Layout/index.js @@ -201,6 +201,7 @@ class Layout extends React.Component { item.onBadgeClick(e); this.toggleAside(); }} + url={item.url} > {item.title} diff --git a/web/ASC.Web.Common/src/components/Layout/sub-components/nav-item.js b/web/ASC.Web.Common/src/components/Layout/sub-components/nav-item.js index 06468b5929..c382248dcd 100644 --- a/web/ASC.Web.Common/src/components/Layout/sub-components/nav-item.js +++ b/web/ASC.Web.Common/src/components/Layout/sub-components/nav-item.js @@ -1,7 +1,7 @@ import React from "react"; import PropTypes from "prop-types"; import styled, { css } from "styled-components"; -import { Badge, Icons, Text} from "asc-web-components"; +import { Badge, Icons, Link} from "asc-web-components"; const baseColor = "#7A95B0", activeColor = "#FFFFFF", @@ -27,7 +27,7 @@ const NavItemWrapper = styled.div` } `; -const NavItemLabel = styled(Text)` +const NavItemLabel = styled(Link)` margin: 0 auto 0 16px; display: ${props => (props.opened ? "block" : "none")}; `; @@ -52,7 +52,8 @@ const NavItem = React.memo(props => { children, badgeNumber, onClick, - onBadgeClick + onBadgeClick, + url } = props; const color = active ? activeColor : baseColor; @@ -66,7 +67,7 @@ const NavItem = React.memo(props => { color: color })} {children && ( - + {children} )} @@ -82,17 +83,15 @@ const NavItem = React.memo(props => { NavItem.displayName = "NavItem"; NavItem.propTypes = { - separator: PropTypes.bool, - opened: PropTypes.bool, active: PropTypes.bool, - iconName: PropTypes.string, badgeNumber: PropTypes.number, - onClick: PropTypes.func, + children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]), + url: PropTypes.string, + iconName: PropTypes.string, onBadgeClick: PropTypes.func, - children: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.node), - PropTypes.node - ]) + onClick: PropTypes.func, + opened: PropTypes.bool, + separator: PropTypes.bool, }; export default NavItem;