@@ -33,7 +33,7 @@ class CalendarProvider extends Component {
33
33
/** whether to show the today button */
34
34
showTodayButton : PropTypes . bool ,
35
35
/** The button top position */
36
- buttonTopPosition : PropTypes . number ,
36
+ todayBottomMargin : PropTypes . number ,
37
37
/** The opacity for the disabled today button (0-1) */
38
38
disabledOpacity : PropTypes . number
39
39
}
@@ -45,7 +45,7 @@ class CalendarProvider extends Component {
45
45
this . state = {
46
46
date : this . props . date || XDate ( ) . toString ( 'yyyy-MM-dd' ) ,
47
47
updateSource : UPDATE_SOURCES . CALENDAR_INIT ,
48
- buttonY : new Animated . Value ( - props . buttonTopPosition || - TOP_POSITION ) ,
48
+ buttonY : new Animated . Value ( - props . todayBottomMargin || - TOP_POSITION ) ,
49
49
buttonIcon : this . getButtonIcon ( props . date ) ,
50
50
disabled : false ,
51
51
opacity : new Animated . Value ( 1 )
@@ -122,7 +122,7 @@ class CalendarProvider extends Component {
122
122
const isToday = today === date ;
123
123
124
124
Animated . spring ( this . state . buttonY , {
125
- toValue : isToday ? TOP_POSITION : - this . props . buttonTopPosition || - TOP_POSITION ,
125
+ toValue : isToday ? TOP_POSITION : - this . props . todayBottomMargin || - TOP_POSITION ,
126
126
tension : 30 ,
127
127
friction : 8 ,
128
128
useNativeDriver : true
0 commit comments