Skip to content

Commit

Permalink
fix(RC-26177): zindex prop for menu (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
jligi committed Apr 17, 2024
1 parent 42c30f7 commit 7a6d6c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "pcln-menu",
"comment": "Adding zindex to menu",
"type": "patch"
}
],
"packageName": "pcln-menu"
}
5 changes: 4 additions & 1 deletion packages/menu/src/Menu/Menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function Menu({
placement,
children,
querySelectorPortal,
zIndex,
...props
}) {
const MenuContent = ({ handleClose }) => (
Expand Down Expand Up @@ -67,7 +68,7 @@ function Menu({
renderContent={MenuContent}
trapFocus={trapFocus}
width={width}
zIndex={1600}
zIndex={zIndex}
querySelectorPortal={`.${querySelectorPortal}`}
{...props}
>
Expand Down Expand Up @@ -95,12 +96,14 @@ Menu.propTypes = {
placement: PropTypes.string,
children: PropTypes.node,
querySelectorPortal: PropTypes.string,
zIndex: PropTypes.number,
}

Menu.defaultProps = {
size: 'singleColumn',
trapFocus: true,
width: '650px',
zIndex: 1600,
}

export default Menu

0 comments on commit 7a6d6c8

Please sign in to comment.