Skip to content

Commit

Permalink
Make indicator height 26% of link element height.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omkar76 committed Dec 24, 2023
1 parent 1ff0d0d commit d8f655e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Components/Common/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ const StatelessSidebar = ({
const e = indicatorRef.current;
const itemHeight = activeLinkRef.current?.clientHeight || 0;
if (lastIndicatorPosition > index) {
e.style.top = `${itemHeight * index + 0.3 * itemHeight}px`;
e.style.top = `${itemHeight * index + 0.37 * itemHeight}px`;
setTimeout(() => {
e.style.bottom = `${itemHeight * (NavItems.length - index + 1.3)}px`;
e.style.bottom = `${itemHeight * (NavItems.length - index + 1.37)}px`;
}, 50);
} else {
e.style.bottom = `${itemHeight * (NavItems.length - index + 1.3)}px`;
e.style.bottom = `${itemHeight * (NavItems.length - index + 1.37)}px`;
setTimeout(() => {
e.style.top = `${itemHeight * index + 0.3 * itemHeight}px`;
e.style.top = `${itemHeight * index + 0.37 * itemHeight}px`;
}, 50);
}
setLastIndicatorPosition(index);
Expand Down

0 comments on commit d8f655e

Please sign in to comment.