Skip to content

Commit

Permalink
fixed Popover issues
Browse files Browse the repository at this point in the history
  • Loading branch information
abottega committed Aug 1, 2024
1 parent 84e6b89 commit c743b38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/components/SideNav/NavItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ const NavItem = ({
Component,
isActive,
handleItemClick,
navItemRefs
navItemRefs,
isSmallScreen
}) => {
// Use the ternary operator to render the appropriate component based on actionType
const accessibilityProps = {
Expand All @@ -212,8 +213,9 @@ const NavItem = ({
<SideNavItemPopover
className={item.bottomAligned && "bottom-aligned"}
text={item.name}
direction={isSmallScreen ? "top" : "right"}
textAlign="center"
width="124px"
width="fit-content"
active={isActive}
bottomAligned={item.bottomAligned}
>
Expand Down Expand Up @@ -252,7 +254,8 @@ NavItem.propTypes = {
Component: PropTypes.elementType,
isActive: PropTypes.bool,
handleItemClick: PropTypes.func,
navItemRefs: PropTypes.object
navItemRefs: PropTypes.object,
isSmallScreen: PropTypes.bool
};

export default NavItem;
1 change: 1 addition & 0 deletions lib/components/SideNav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ const SideNav = ({ items, sideNavHeight }) => {
<NavItem
key={item.index}
item={item}
isSmallScreen={isSmallScreen}
Component={Component}
isActive={
item.actionType === "link"
Expand Down

0 comments on commit c743b38

Please sign in to comment.