Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ class AttachmentModal extends PureComponent {
Boolean(this.state.source) &&
this.state.shouldLoadAttachment && (
<AttachmentView
containerStyles={[styles.mh5]}
source={source}
isAuthTokenRequired={this.props.isAuthTokenRequired}
file={this.state.file}
Expand Down
7 changes: 6 additions & 1 deletion src/components/AttachmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const propTypes = {
/** Notify parent that the UI should be modified to accommodate keyboard */
onToggleKeyboard: PropTypes.func,

/** Extra styles to pass to View wrapper */
// eslint-disable-next-line react/forbid-prop-types
containerStyles: PropTypes.arrayOf(PropTypes.object),

...withLocalizePropTypes,
};

Expand All @@ -56,6 +60,7 @@ const defaultProps = {
onPress: undefined,
onScaleChanged: () => {},
onToggleKeyboard: () => {},
containerStyles: [],
};

const AttachmentView = (props) => {
Expand Down Expand Up @@ -124,7 +129,7 @@ const AttachmentView = (props) => {
}

return (
<View style={styles.defaultAttachmentView}>
<View style={[styles.defaultAttachmentView, ...props.containerStyles]}>
<View style={styles.mr2}>
<Icon src={Expensicons.Paperclip} />
</View>
Expand Down