File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/components/SyntaxHighlighter Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,20 @@ export function YDBSyntaxHighlighter({
8888 return null ;
8989 } ;
9090
91+ let paddingStyles = { } ;
92+
93+ if (
94+ withClipboardButton &&
95+ typeof withClipboardButton === 'object' &&
96+ withClipboardButton . alwaysVisible
97+ ) {
98+ if ( withClipboardButton . withLabel ) {
99+ paddingStyles = { paddingRight : 80 } ;
100+ } else {
101+ paddingStyles = { paddingRight : 40 } ;
102+ }
103+ }
104+
91105 return (
92106 < div className = { b ( null , className ) } >
93107 { renderCopyButton ( ) }
@@ -96,7 +110,7 @@ export function YDBSyntaxHighlighter({
96110 key = { highlighterKey }
97111 language = { language }
98112 style = { style }
99- customStyle = { { height : '100%' } }
113+ customStyle = { { height : '100%' , ... paddingStyles } }
100114 >
101115 { text }
102116 </ ReactSyntaxHighlighter >
You can’t perform that action at this time.
0 commit comments