Skip to content

Commit b58cfd0

Browse files
authored
chore(side-panel): fix margin flashing bug (#4378)
1 parent 85e73a5 commit b58cfd0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/red-waves-flash.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@twilio-paste/side-panel": patch
3+
"@twilio-paste/core": patch
4+
---
5+
6+
[Side Panel] Fix bug where rendering side panel closed would flash a right margin while breakpointindex was undefined.

packages/paste-core/components/side-panel/src/SidePanelPushContentWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const SidePanelPushContentWrapper = React.forwardRef<HTMLDivElement, Side
3434
{...safelySpreadBoxProps(props)}
3535
ref={ref}
3636
// when using side panels in responsive layouts, we don't want any left margin in small screen, or initial SSR render situations. So basically never apply it in those situations
37-
style={breakpointIndex === undefined || breakpointIndex === 0 ? undefined : styles}
37+
style={breakpointIndex === 0 ? undefined : styles}
3838
marginRight={["space0", theme.sizes.size40]}
3939
minWidth="size0"
4040
element={element}

0 commit comments

Comments
 (0)