Skip to content

Commit

Permalink
replace values with consts
Browse files Browse the repository at this point in the history
  • Loading branch information
Uros787 committed Oct 28, 2022
1 parent cc92859 commit d4a1cb5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const CONST = {
ANDROID_PACKAGE_NAME,
ANIMATED_TRANSITION: 300,
ANIMATED_TRANSITION_FROM_VALUE: 100,
ANIMATION_IN_TIMING: 100,

API_ATTACHMENT_VALIDATIONS: {
// Same as the PHP layer allows
Expand Down
3 changes: 2 additions & 1 deletion src/components/Popover/popoverPropTypes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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, ['type', 'popoverAnchorPosition'])),
Expand All @@ -25,7 +26,7 @@ const defaultProps = {

animationIn: 'fadeIn',
animationOut: 'fadeOut',
animationInTiming: 300,
animationInTiming: CONST.ANIMATED_TRANSITION,

// Anchor position is optional only because it is not relevant on mobile
anchorPosition: {},
Expand Down
3 changes: 2 additions & 1 deletion src/components/PopoverMenu/popoverMenuPropTypes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import PropTypes from 'prop-types';
import CONST from '../../CONST';

const propTypes = {
/** Callback method fired when the user requests to close the modal */
Expand Down Expand Up @@ -57,7 +58,7 @@ const propTypes = {
const defaultProps = {
animationIn: 'fadeIn',
animationOut: 'fadeOut',
animationInTiming: 300,
animationInTiming: CONST.ANIMATED_TRANSITION,
headerText: undefined,
disableAnimation: true,
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ class ReportActionCompose extends React.Component {
</Tooltip>
</View>
<PopoverMenu
animationInTiming={100}
animationInTiming={CONST.ANIMATION_IN_TIMING}
isVisible={this.state.isMenuVisible}
onClose={() => this.setMenuVisibility(false)}
onItemSelected={() => this.setMenuVisibility(false)}
Expand Down

0 comments on commit d4a1cb5

Please sign in to comment.