11import { StyleSheet , Platform } from 'react-native' ;
22import * as defaultStyle from '../style' ;
33import { Theme } from '../types' ;
4+ import constants from '../commons/constants' ;
45
56
6- const commons = require ( './commons' ) ;
77export const HEADER_HEIGHT = 68 ;
88export const KNOB_CONTAINER_HEIGHT = 24 ;
99
@@ -96,7 +96,7 @@ export default function styleConstructor(theme: Theme = {}) {
9696 position : 'absolute' ,
9797 left : 0 ,
9898 right : 0 ,
99- top : HEADER_HEIGHT + ( commons . isAndroid ? 8 : 4 ) , // align row on top of calendar's first row
99+ top : HEADER_HEIGHT + ( constants . isAndroid ? 8 : 4 ) , // align row on top of calendar's first row
100100 } ,
101101 hidden : {
102102 opacity : 0
@@ -133,7 +133,7 @@ export default function styleConstructor(theme: Theme = {}) {
133133 } ,
134134 arrowImage : {
135135 tintColor : appStyle . arrowColor ,
136- transform : commons . isRTL ? [ { scaleX : - 1 } ] : undefined
136+ transform : constants . isRTL ? [ { scaleX : - 1 } ] : undefined
137137 } ,
138138 todayButtonContainer : {
139139 alignItems : appStyle . todayButtonPosition === 'right' ? 'flex-end' : 'flex-start' ,
@@ -143,9 +143,9 @@ export default function styleConstructor(theme: Theme = {}) {
143143 bottom : 0
144144 } ,
145145 todayButton : {
146- height : commons . isTablet ? 40 : 28 ,
147- paddingHorizontal : commons . isTablet ? 20 : 12 ,
148- borderRadius : commons . isTablet ? 20 : 14 ,
146+ height : constants . isTablet ? 40 : 28 ,
147+ paddingHorizontal : constants . isTablet ? 20 : 12 ,
148+ borderRadius : constants . isTablet ? 20 : 14 ,
149149 flexDirection : appStyle . todayButtonPosition === 'right' ? 'row-reverse' : 'row' ,
150150 justifyContent : 'center' ,
151151 alignItems : 'center' ,
@@ -164,7 +164,7 @@ export default function styleConstructor(theme: Theme = {}) {
164164 } ,
165165 todayButtonText : {
166166 color : appStyle . todayButtonTextColor ,
167- fontSize : commons . isTablet ? appStyle . todayButtonFontSize + 2 : appStyle . todayButtonFontSize ,
167+ fontSize : constants . isTablet ? appStyle . todayButtonFontSize + 2 : appStyle . todayButtonFontSize ,
168168 fontWeight : appStyle . todayButtonFontWeight ,
169169 fontFamily : appStyle . todayButtonFontFamily
170170 } ,
0 commit comments