Skip to content

Commit d538daf

Browse files
committed
changing prop name
1 parent 17e9bb8 commit d538daf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example/src/screens/expandableCalendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default class ExpandableCalendarScreen extends Component {
157157
theme={{todayButtonTextColor: '#0059ff'}}
158158
showTodayButton
159159
disabledOpacity={0.6}
160-
// buttonTopPosition={16}
160+
// todayBottomMargin={16}
161161
>
162162
<ExpandableCalendar
163163
// horizontal={false}

src/expandableCalendar/calendarProvider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CalendarProvider extends Component {
3333
/** whether to show the today button */
3434
showTodayButton: PropTypes.bool,
3535
/** The button top position */
36-
buttonTopPosition: PropTypes.number,
36+
todayBottomMargin: PropTypes.number,
3737
/** The opacity for the disabled today button (0-1) */
3838
disabledOpacity: PropTypes.number
3939
}
@@ -45,7 +45,7 @@ class CalendarProvider extends Component {
4545
this.state = {
4646
date: this.props.date || XDate().toString('yyyy-MM-dd'),
4747
updateSource: UPDATE_SOURCES.CALENDAR_INIT,
48-
buttonY: new Animated.Value(-props.buttonTopPosition || -TOP_POSITION),
48+
buttonY: new Animated.Value(-props.todayBottomMargin || -TOP_POSITION),
4949
buttonIcon: this.getButtonIcon(props.date),
5050
disabled: false,
5151
opacity: new Animated.Value(1)
@@ -122,7 +122,7 @@ class CalendarProvider extends Component {
122122
const isToday = today === date;
123123

124124
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,
126126
tension: 30,
127127
friction: 8,
128128
useNativeDriver: true

0 commit comments

Comments
 (0)