Skip to content

Commit

Permalink
Adjust overlay style to LHP borderRadius
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Dec 18, 2023
1 parent bc38b46 commit 53e4fd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1385,8 +1385,8 @@ const styles = (theme: ThemeColors) =>
position: 'absolute',
left: 0,
height: '100%',
borderTopRightRadius: isSmallScreenWidth ? 0 : 24,
borderBottomRightRadius: isSmallScreenWidth ? 0 : 24,
borderTopRightRadius: isSmallScreenWidth ? 0 : variables.lhpBorderRadius,
borderBottomRightRadius: isSmallScreenWidth ? 0 : variables.lhpBorderRadius,
overflow: 'hidden',
} satisfies ViewStyle),
RHPNavigatorContainer: (isSmallScreenWidth: boolean) =>
Expand Down Expand Up @@ -1614,7 +1614,8 @@ const styles = (theme: ThemeColors) =>
({
...positioning.pFixed,
// We need to stretch the overlay to cover the sidebar and the translate animation distance.
left: isModalOnTheLeft ? 0 : -2 * variables.sideBarWidth,
// The overlay must also cover borderRadius of the LHP component
left: isModalOnTheLeft ? -variables.lhpBorderRadius : -2 * variables.sideBarWidth,
top: 0,
bottom: 0,
right: isModalOnTheLeft ? -2 * variables.sideBarWidth : 0,
Expand Down
2 changes: 2 additions & 0 deletions src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,6 @@ export default {
cardPreviewHeight: 148,
cardPreviewWidth: 235,
cardNameWidth: 156,

lhpBorderRadius: 24,
} as const;

0 comments on commit 53e4fd6

Please sign in to comment.