From ba085773569fcf0374df0531107f04285056ea94 Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Sat, 13 May 2023 00:30:25 +0400 Subject: [PATCH 1/3] set wrap long lines to true react StyledSyntaxHighlighter --- code/addons/storysource/src/StoryPanel.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/addons/storysource/src/StoryPanel.tsx b/code/addons/storysource/src/StoryPanel.tsx index 260fbdb316fa..4dd67b8b8b42 100644 --- a/code/addons/storysource/src/StoryPanel.tsx +++ b/code/addons/storysource/src/StoryPanel.tsx @@ -176,6 +176,8 @@ export const StoryPanel: React.FC = ({ api }) => { format={false} copyable={false} padded + wrapLongLines + lineProps={{ style: { whiteSpace: 'pre' } }} > {source} From 51df228f35e7dd73787b9772b468b3ee48c9c58b Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Tue, 30 May 2023 05:56:35 +0400 Subject: [PATCH 2/3] Merge branch 'next' into chaks/fix-react-syntaxhighlighter-wrap From 0432cfd7f144afa586d7c0ac4a12cbe40d3af773 Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Fri, 2 Jun 2023 18:28:46 +0400 Subject: [PATCH 3/3] fix type checking --- .../components/src/syntaxhighlighter/syntaxhighlighter-types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ui/components/src/syntaxhighlighter/syntaxhighlighter-types.ts b/code/ui/components/src/syntaxhighlighter/syntaxhighlighter-types.ts index b2c5ee2d39ee..f2287c985c7f 100644 --- a/code/ui/components/src/syntaxhighlighter/syntaxhighlighter-types.ts +++ b/code/ui/components/src/syntaxhighlighter/syntaxhighlighter-types.ts @@ -35,6 +35,7 @@ export interface SyntaxHighlighterBaseProps { lineProps?: LineTagPropsFunction | React.HTMLProps; showLineNumbers?: boolean; startingLineNumber?: number; + wrapLongLines?: boolean; style?: any; useInlineStyles?: boolean; }