From b91547032ddd4417de6f69eb9eccbc50bc017238 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Sat, 22 Aug 2020 14:13:27 +0200 Subject: [PATCH] Fix styles issue --- components/calendar.js | 16 +--------------- components/helpers/calendar.js | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/components/calendar.js b/components/calendar.js index c5f7c21..d3a9c44 100644 --- a/components/calendar.js +++ b/components/calendar.js @@ -11,13 +11,12 @@ import { getBleedingDaysSortedByDate } from '../db' import cycleModule from '../lib/cycle' import nothingChanged from '../db/db-unchanged' import { + calendarTheme, predictionToCalFormat, toCalFormat, todayToCalFormat } from './helpers/calendar' -import { Colors, Fonts, Sizes } from '../../styles' - class CalendarView extends Component { static propTypes = { setDate: PropTypes.func.isRequired, @@ -88,19 +87,6 @@ const styles = StyleSheet.create({ container: { flex: 1 } }) -const calendarTheme = StyleSheet.create({ - calendarBackground: Colors.tourquiseLight, - dayTextColor: Colors.greyDark, - monthTextColor: Colors.purple, - textDayFontFamily: Fonts.main, - textMonthFontFamily: Fonts.bold, - textDayHeaderFontFamily: Fonts.bold, - textDayFontSize: Sizes.small, - textMonthFontSize: Sizes.subtitle, - textDayHeaderFontSize: Sizes.small, - textSectionTitleColor: Colors.orange, -}) - const mapDispatchToProps = (dispatch) => { return({ setDate: (date) => dispatch(setDate(date)), diff --git a/components/helpers/calendar.js b/components/helpers/calendar.js index c29318b..6b91f78 100644 --- a/components/helpers/calendar.js +++ b/components/helpers/calendar.js @@ -1,6 +1,6 @@ import { LocalDate } from 'js-joda' -import { Colors, Fonts } from '../../styles' +import { Colors, Fonts, Sizes } from '../../styles' const { shades } = Colors.iconColors.bleeding @@ -64,4 +64,17 @@ const styles = { fontFamily: Fonts.bold, color: Colors.purple }, -} \ No newline at end of file +} + +const calendarTheme = { + calendarBackground: Colors.tourquiseLight, + dayTextColor: Colors.greyDark, + monthTextColor: Colors.purple, + textDayFontFamily: Fonts.main, + textMonthFontFamily: Fonts.bold, + textDayHeaderFontFamily: Fonts.bold, + textDayFontSize: Sizes.small, + textMonthFontSize: Sizes.subtitle, + textDayHeaderFontSize: Sizes.small, + textSectionTitleColor: Colors.orange, +}