Skip to content

Commit

Permalink
adjust offset for glow effect around active tab
Browse files Browse the repository at this point in the history
  • Loading branch information
sserrata committed Oct 4, 2024
1 parent b702763 commit 1337735
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ function TabList({
const activeTabRect = activeTab.getBoundingClientRect();

// Calculate the distance to scroll to align active tab to the left
const glowOffset = 3;
const scrollOffset =
activeTabRect.left - containerRect.left + container.scrollLeft;
activeTabRect.left -
containerRect.left +
container.scrollLeft -
glowOffset;

// Check if the active tab is not already at the left position

Expand Down

0 comments on commit 1337735

Please sign in to comment.