Skip to content

Commit

Permalink
cleaned up styling of buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Jul 20, 2022
1 parent 2e6ae8d commit b52ee9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/components/AttachmentCarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {View} from 'react-native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import _ from 'lodash';
import styles from '../styles/styles';
import Button from './Button';
import * as Expensicons from './Icon/Expensicons';
import styles from '../styles/styles';
import themeColors from '../styles/themes/default';
import Button from './Button';
import reportActionPropTypes from '../pages/home/report/reportActionPropTypes';
import CONFIG from '../CONFIG';
import CONST from '../CONST';
Expand Down Expand Up @@ -87,14 +87,18 @@ class AttachmentCarousel extends React.Component {
return (
<View style={[styles.attachmentModalArrowsContainer]}>
<Button
medium
icon={Expensicons.BackArrow}
iconFill={themeColors.text}
iconStyles={[styles.mr0]}
onPress={() => this.cycleThroughAttachments(true)}
isDisabled={this.state.isBackDisabled}
/>
<Button
medium
icon={Expensicons.ArrowRight}
iconFill={themeColors.text}
iconStyles={[styles.mr0]}
onPress={() => this.cycleThroughAttachments(false)}
isDisabled={this.state.isForwardDisabled}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AttachmentModal extends PureComponent {

// this prevents a bug in iOS that would show the last image before closing then opening on a new image
static getDerivedStateFromProps(props, state) {
if (state.isModalOpen && state.isModalOpen !== state.prevIsModalOpen) {
if (state.isModalOpen && props.sourceURL && state.isModalOpen !== state.prevIsModalOpen) {
return {
prevIsModalOpen: true,
file: {name: lodashGet(props, 'originalFileName', '')},
Expand Down

0 comments on commit b52ee9c

Please sign in to comment.