Skip to content

Commit

Permalink
Merge pull request #548 from Atom-Learning/DS-448-tab-list-left-arrow…
Browse files Browse the repository at this point in the history
…-text-overlap

fix: move left arrow in TabsTriggerList so always over list, negate t…
  • Loading branch information
LimeWub authored Jul 26, 2023
2 parents 83e4a12 + 7c9ccaa commit 678000c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/components/tabs/TabsTriggerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export const TabsTriggerList: React.FC<
{...colorScheme}
{...rest}
>
<StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>

{canScrollLeft && (
<StyledChevronActionIcon
label="scroll left"
Expand All @@ -96,13 +98,12 @@ export const TabsTriggerList: React.FC<
left: 0
}}
onClick={() => scrollList(-SCROLL_STEP)}
tabIndex={-1}
>
<Icon is={ChevronLeft} />
</StyledChevronActionIcon>
)}

<StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>

{canScrollRight && (
<StyledChevronActionIcon
label="scroll right"
Expand All @@ -111,6 +112,7 @@ export const TabsTriggerList: React.FC<
right: 0
}}
onClick={() => scrollList(SCROLL_STEP)}
tabIndex={-1}
>
<Icon is={ChevronRight} />
</StyledChevronActionIcon>
Expand Down

0 comments on commit 678000c

Please sign in to comment.