Skip to content

Commit

Permalink
ADD custom scroller to syntaxhighlighter
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Feb 27, 2019
1 parent 2b597ff commit 5ef058d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/components/src/syntaxhighlighter/syntaxhighlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import html from 'react-syntax-highlighter/languages/prism/markup';
import SyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/prism-light';
import { js as beautify } from 'js-beautify';
import { ActionBar } from '../ActionBar/ActionBar';
import { ScrollArea } from '../ScrollArea/ScrollArea';

registerLanguage('jsx', jsx);
registerLanguage('bash', bash);
Expand All @@ -37,10 +38,9 @@ const Wrapper = styled.div(
: {}
);

const Scroller = styled.div(
const Scroller = styled(props => <ScrollArea vertical horizontal {...props} />)(
{
position: 'relative',
overflow: 'auto',
},
({ theme }) => ({
'& code': {
Expand Down

0 comments on commit 5ef058d

Please sign in to comment.