Skip to content

Commit 529685e

Browse files
committed
Tweak outer bracket positioning
1 parent 293891a commit 529685e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,10 @@ This component is heavily inspired by [react-json-view](https://github.com/mac-s
692692
693693
## Changelog
694694
695-
- **1.15.6**: Small bug fix for `overflow: clip` setting based on animating
695+
- **1.15.7**:
696+
- Small bug fix for `overflow: clip` setting based on animating
696697
state
698+
- Small tweak to outer bracket positioning
697699
- **1.15.5**: Bug fix for collapse icon being clipped when indent is low #104
698700
- **1.15.3**:
699701
- Allow [UpdateFunction](#update-functions) to return `true` to represent success

src/CollectionNode.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,13 @@ export const CollectionNode: React.FC<CollectionNodeProps> = (props) => {
441441
)}
442442
</div>
443443
{!isEditing && showCollectionWrapper && (
444-
<div className="jer-brackets jer-bracket-outside" style={getStyles('bracket', nodeData)}>
444+
<div
445+
className="jer-brackets jer-bracket-outside"
446+
style={{
447+
...getStyles('bracket', nodeData),
448+
marginLeft: `${indent < 3 ? -1 : indent < 6 ? -0.5 : 0}em`,
449+
}}
450+
>
445451
{brackets.close}
446452
</div>
447453
)}

0 commit comments

Comments
 (0)