Skip to content

Commit

Permalink
fix: props for contextmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Jun 10, 2021
1 parent 18b9be0 commit 80869c9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/ContextMenuPopover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const ContextMenuPopover = props => (!props.isSmallScreenWidth ? createPortal(
<Popover
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
type={CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED}
/>
));

Expand Down
2 changes: 2 additions & 0 deletions src/components/ContextMenuPopover/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import {propTypes, defaultProps} from '../Popover/PopoverPropTypes';
import withWindowDimensions from '../withWindowDimensions';
import Popover from '../Popover';
import CONST from '../../CONST';

/*
* This is a convenience wrapper around the Modal component for a responsive Popover.
Expand All @@ -11,6 +12,7 @@ const ContextMenuPopover = props => (
<Popover
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
type={CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED}
/>
);

Expand Down
2 changes: 0 additions & 2 deletions src/components/Popover/PopoverPropTypes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import _ from 'underscore';
import PropTypes from 'prop-types';
import {propTypes as modalPropTypes, defaultProps as defaultModalProps} from '../Modal/ModalPropTypes';
import CONST from '../../CONST';

const propTypes = {
...(_.omit(modalPropTypes, 'popoverAnchorPosition')),
Expand All @@ -20,7 +19,6 @@ const defaultProps = {

// Anchor position is optional only because it is not relevant on mobile
anchorPosition: {},
type: CONST.MODAL.MODAL_TYPE.POPOVER,
};

export {propTypes, defaultProps};
2 changes: 1 addition & 1 deletion src/components/Popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withWindowDimensions from '../withWindowDimensions';
*/
const Popover = props => (
<Modal
type={props.isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : props.type}
type={props.isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.POPOVER}
popoverAnchorPosition={props.anchorPosition}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
Expand Down

0 comments on commit 80869c9

Please sign in to comment.