Skip to content

Commit

Permalink
Show/Hide month title (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: Sami RIMANI <Sami.RIMANI@ebp.com>
  • Loading branch information
RimApp and Sami RIMANI authored Sep 22, 2020
1 parent 6b9a832 commit 22b018f
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Title/Title.js
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ const getFontSizeHeader = (numberOfDays) => {
return 16;
};

const Title = ({ style, numberOfDays, selectedDate }) => {
const Title = ({ style, showTitle, numberOfDays, selectedDate }) => {
return (
<View style={[styles.title, style]}>
<Text
@@ -22,7 +22,7 @@ const Title = ({ style, numberOfDays, selectedDate }) => {
textAlign: 'center',
}}
>
{getCurrentMonth(selectedDate)}
{showTitle ? getCurrentMonth(selectedDate) : null}
</Text>
</View>
);
2 changes: 2 additions & 0 deletions src/WeekView/WeekView.js
Original file line number Diff line number Diff line change
@@ -188,6 +188,7 @@ export default class WeekView extends Component {

render() {
const {
showTitle,
numberOfDays,
headerStyle,
formatDateHeader,
@@ -205,6 +206,7 @@ export default class WeekView extends Component {
<View style={styles.container}>
<View style={styles.headerContainer}>
<Title
showTitle={showTitle}
style={headerStyle}
numberOfDays={numberOfDays}
selectedDate={currentMoment}

0 comments on commit 22b018f

Please sign in to comment.