@@ -13,7 +13,7 @@ const DEFAULT_SELECTED_BACKGROUND_COLOR = '#5ce600';
1313const DEFAULT_SELECTED_TEXT_COLOR = '#000000' ;
1414const DEFAULT_TODAY_BACKGROUD_COLOR = '#CCCCCC' ;
1515
16- function makeStyles ( scaler , backgroundColor , textColor , todayBackgroundColor ) {
16+ function makeStyles ( { rtl , initialScale : scaler , backgroundColor, textColor, todayBackgroundColor} ) {
1717 const SELECTED_BG_COLOR = backgroundColor ? backgroundColor : DEFAULT_SELECTED_BACKGROUND_COLOR ;
1818 const SELECTED_TEXT_COLOR = textColor ? textColor : DEFAULT_SELECTED_TEXT_COLOR ;
1919 const TODAY_BG_COLOR = todayBackgroundColor ? todayBackgroundColor : DEFAULT_TODAY_BACKGROUD_COLOR ;
@@ -43,7 +43,7 @@ function makeStyles(scaler, backgroundColor, textColor, todayBackgroundColor) {
4343 } ,
4444
4545 dayLabelsWrapper : {
46- flexDirection : 'row' ,
46+ flexDirection : rtl ? 'row-reverse' : 'row' ,
4747 borderBottomWidth : 1 ,
4848 borderTopWidth : 1 ,
4949 paddingTop : 10 * scaler ,
@@ -133,7 +133,7 @@ function makeStyles(scaler, backgroundColor, textColor, todayBackgroundColor) {
133133
134134 headerWrapper : {
135135 alignItems : 'center' ,
136- flexDirection : 'row' ,
136+ flexDirection : rtl ? 'row-reverse' : 'row' ,
137137 alignSelf : 'center' ,
138138 padding : 5 * scaler ,
139139 paddingBottom : 3 * scaler ,
@@ -147,11 +147,11 @@ function makeStyles(scaler, backgroundColor, textColor, todayBackgroundColor) {
147147 } ,
148148
149149 prev : {
150- textAlign : 'left' ,
150+ textAlign : rtl ? 'right' : 'left' ,
151151 } ,
152152
153153 next : {
154- textAlign : 'right' ,
154+ textAlign : rtl ? 'left' : 'right' ,
155155 } ,
156156
157157 yearLabel : {
@@ -166,7 +166,7 @@ function makeStyles(scaler, backgroundColor, textColor, todayBackgroundColor) {
166166 } ,
167167
168168 weekRow : {
169- flexDirection : 'row' ,
169+ flexDirection : rtl ? 'row-reverse' : 'row' ,
170170 } ,
171171
172172 disabledText : {
0 commit comments