File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/compass-components/src/components/document-list Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -399,13 +399,15 @@ export const HadronElement: React.FunctionComponent<{
399399 value : HadronElementType ;
400400 editable : boolean ;
401401 editingEnabled : boolean ;
402+ extraPaddingLeft ?: number ;
402403 onEditStart ?: ( id : string , field : 'key' | 'value' | 'type' ) => void ;
403404 lineNumberSize : number ;
404405 onAddElement ( el : HadronElementType ) : void ;
405406} > = ( {
406407 value : element ,
407408 editable,
408409 editingEnabled,
410+ extraPaddingLeft = 0 ,
409411 onEditStart,
410412 lineNumberSize,
411413 onAddElement,
@@ -445,8 +447,8 @@ export const HadronElement: React.FunctionComponent<{
445447 } , [ lineNumberSize , editingEnabled ] ) ;
446448
447449 const elementSpacerWidth = useMemo (
448- ( ) => calculateElementSpacerWidth ( editable , level ) ,
449- [ editable , level ]
450+ ( ) => calculateElementSpacerWidth ( editable , level ) + extraPaddingLeft ,
451+ [ editable , level , extraPaddingLeft ]
450452 ) ;
451453
452454 // To render the "Show more" toggle for the nested expandable elements we need
@@ -711,6 +713,7 @@ export const HadronElement: React.FunctionComponent<{
711713 onEditStart = { onEditStart }
712714 lineNumberSize = { lineNumberSize }
713715 onAddElement = { onAddElement }
716+ extraPaddingLeft = { extraPaddingLeft }
714717 > </ HadronElement >
715718 ) ;
716719 } ) }
You can’t perform that action at this time.
0 commit comments