Skip to content

Commit

Permalink
fix(code-snippet): scrollbar not clickable on muliline
Browse files Browse the repository at this point in the history
closes #9946
  • Loading branch information
alisonjoseph committed Nov 11, 2022
1 parent 7a728ed commit 4d099d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react/src/components/CodeSnippet/CodeSnippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ function CodeSnippet({
[`${prefix}--snippet--light`]: light,
[`${prefix}--snippet--no-copy`]: hideCopyButton,
[`${prefix}--snippet--wraptext`]: wrapText,
[`${prefix}--snippet--has-right-overflow`]:
type == 'multi' && hasRightOverflow,
});

const expandCodeBtnText = expandedCode ? showLessText : showMoreText;
Expand Down Expand Up @@ -243,7 +245,7 @@ function CodeSnippet({
{hasLeftOverflow && (
<div className={`${prefix}--snippet__overflow-indicator--left`} />
)}
{hasRightOverflow && (
{hasRightOverflow && type !== 'multi' && (
<div className={`${prefix}--snippet__overflow-indicator--right`} />
)}
{!hideCopyButton && (
Expand Down

0 comments on commit 4d099d3

Please sign in to comment.