Skip to content

Commit

Permalink
remove textSize from Header
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed May 14, 2021
1 parent b646e23 commit 0d66b62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,16 @@ const propTypes = {
/** Title of the Header */
title: PropTypes.string.isRequired,

/** Size of the displayed text */
textSize: PropTypes.oneOf(['default', 'large']),

/** Should we show the environment badge (dev/stg)? */
shouldShowEnvironmentBadge: PropTypes.bool,
};

const defaultProps = {
textSize: 'default',
shouldShowEnvironmentBadge: false,
};
const Header = props => (
<View style={[styles.flex1, styles.flexRow]}>
<Text numberOfLines={2} style={[styles.headerText, props.textSize === 'large' && styles.textLarge]}>
<Text numberOfLines={2} style={[styles.headerText, styles.textLarge]}>
{props.title}
</Text>
{props.shouldShowEnvironmentBadge && (
Expand Down
6 changes: 1 addition & 5 deletions src/components/HeaderWithCloseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const propTypes = {
/** Whether we should show a back icon */
shouldShowBackButton: PropTypes.bool,

/** Fontsize for the text in the Header */
textSize: PropTypes.oneOf(['default', 'large']),

/** Whether we should show a border on the bottom of the Header */
shouldShowBorderBottom: PropTypes.bool,

Expand All @@ -40,7 +37,6 @@ const defaultProps = {
onCloseButtonPress: () => {},
onBackButtonPress: () => {},
shouldShowBackButton: false,
textSize: 'large',
shouldShowBorderBottom: false,
};

Expand All @@ -63,7 +59,7 @@ const HeaderWithCloseButton = props => (
<Icon src={BackArrow} />
</TouchableOpacity>
)}
<Header title={props.title} textSize={props.textSize} />
<Header title={props.title} />
<View style={[styles.reportOptions, styles.flexRow]}>
{
props.title === props.translate('common.attachment') && (
Expand Down

0 comments on commit 0d66b62

Please sign in to comment.