Skip to content

Commit

Permalink
Merge pull request #22541 from storybookjs/chaks/fix-react-syntaxhigh…
Browse files Browse the repository at this point in the history
…lighter-wrap

Storysource: Fix StyledSyntaxHighlighter to wrap long lines
  • Loading branch information
chakAs3 authored Jun 2, 2023
2 parents 2bd02fe + 243fb0f commit e0d42d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/addons/storysource/src/StoryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ export const StoryPanel: React.FC<StoryPanelProps> = ({ api }) => {
format={false}
copyable={false}
padded
wrapLongLines
lineProps={{ style: { whiteSpace: 'pre' } }}
>
{source}
</StyledSyntaxHighlighter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface SyntaxHighlighterBaseProps {
lineProps?: LineTagPropsFunction | React.HTMLProps<HTMLElement>;
showLineNumbers?: boolean;
startingLineNumber?: number;
wrapLongLines?: boolean;
style?: any;
useInlineStyles?: boolean;
}
Expand Down

0 comments on commit e0d42d6

Please sign in to comment.