Skip to content

Commit

Permalink
changing prop name
Browse files Browse the repository at this point in the history
  • Loading branch information
Inbal-Tish committed Aug 7, 2019
1 parent 17e9bb8 commit d538daf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/src/screens/expandableCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class ExpandableCalendarScreen extends Component {
theme={{todayButtonTextColor: '#0059ff'}}
showTodayButton
disabledOpacity={0.6}
// buttonTopPosition={16}
// todayBottomMargin={16}
>
<ExpandableCalendar
// horizontal={false}
Expand Down
6 changes: 3 additions & 3 deletions src/expandableCalendar/calendarProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CalendarProvider extends Component {
/** whether to show the today button */
showTodayButton: PropTypes.bool,
/** The button top position */
buttonTopPosition: PropTypes.number,
todayBottomMargin: PropTypes.number,
/** The opacity for the disabled today button (0-1) */
disabledOpacity: PropTypes.number
}
Expand All @@ -45,7 +45,7 @@ class CalendarProvider extends Component {
this.state = {
date: this.props.date || XDate().toString('yyyy-MM-dd'),
updateSource: UPDATE_SOURCES.CALENDAR_INIT,
buttonY: new Animated.Value(-props.buttonTopPosition || -TOP_POSITION),
buttonY: new Animated.Value(-props.todayBottomMargin || -TOP_POSITION),
buttonIcon: this.getButtonIcon(props.date),
disabled: false,
opacity: new Animated.Value(1)
Expand Down Expand Up @@ -122,7 +122,7 @@ class CalendarProvider extends Component {
const isToday = today === date;

Animated.spring(this.state.buttonY, {
toValue: isToday ? TOP_POSITION : -this.props.buttonTopPosition || -TOP_POSITION,
toValue: isToday ? TOP_POSITION : -this.props.todayBottomMargin || -TOP_POSITION,
tension: 30,
friction: 8,
useNativeDriver: true
Expand Down

0 comments on commit d538daf

Please sign in to comment.