Fix styles issue

This commit is contained in:
Sofiya Tepikin
2020-08-22 14:13:27 +02:00
parent 5a555f5965
commit b91547032d
2 changed files with 16 additions and 17 deletions
+1 -15
View File
@@ -11,13 +11,12 @@ import { getBleedingDaysSortedByDate } from '../db'
import cycleModule from '../lib/cycle' import cycleModule from '../lib/cycle'
import nothingChanged from '../db/db-unchanged' import nothingChanged from '../db/db-unchanged'
import { import {
calendarTheme,
predictionToCalFormat, predictionToCalFormat,
toCalFormat, toCalFormat,
todayToCalFormat todayToCalFormat
} from './helpers/calendar' } from './helpers/calendar'
import { Colors, Fonts, Sizes } from '../../styles'
class CalendarView extends Component { class CalendarView extends Component {
static propTypes = { static propTypes = {
setDate: PropTypes.func.isRequired, setDate: PropTypes.func.isRequired,
@@ -88,19 +87,6 @@ const styles = StyleSheet.create({
container: { flex: 1 } 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) => { const mapDispatchToProps = (dispatch) => {
return({ return({
setDate: (date) => dispatch(setDate(date)), setDate: (date) => dispatch(setDate(date)),
+15 -2
View File
@@ -1,6 +1,6 @@
import { LocalDate } from 'js-joda' import { LocalDate } from 'js-joda'
import { Colors, Fonts } from '../../styles' import { Colors, Fonts, Sizes } from '../../styles'
const { shades } = Colors.iconColors.bleeding const { shades } = Colors.iconColors.bleeding
@@ -64,4 +64,17 @@ const styles = {
fontFamily: Fonts.bold, fontFamily: Fonts.bold,
color: Colors.purple color: Colors.purple
}, },
} }
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,
}