Skip to content
Snippets Groups Projects
Commit aae470f4 authored by Pedro Abreu's avatar Pedro Abreu
Browse files

Add stories

parent debfe42e
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@ const propTypes = forbidExtraProps({
startDateOffset: PropTypes.func,
endDateOffset: PropTypes.func,
showInputs: PropTypes.bool,
minDate: momentPropTypes.momentObj,
maxDate: momentPropTypes.momentObj,
keepOpenOnDateSelect: PropTypes.bool,
minimumNights: PropTypes.number,
......@@ -62,6 +64,8 @@ const defaultProps = {
startDateOffset: undefined,
endDateOffset: undefined,
showInputs: false,
minDate: null,
maxDate: null,
// day presentation and interaction related props
renderCalendarDay: undefined,
......
......@@ -248,6 +248,17 @@ storiesOf('DayPickerRangeController', module)
navNext={<TestNextIcon />}
/>
)))
.add('with custom month navigation and blocked navigation (minDate and maxDate)', withInfo()(() => (
<DayPickerRangeControllerWrapper
minDate={moment('2018-07-01')}
maxDate={moment('2018-10-20')}
onOutsideClick={action('DayPickerRangeController::onOutsideClick')}
onPrevMonthClick={action('DayPickerRangeController::onPrevMonthClick')}
onNextMonthClick={action('DayPickerRangeController::onNextMonthClick')}
navPrev={<TestPrevIcon />}
navNext={<TestNextIcon />}
/>
)))
.add('with outside days enabled', withInfo()(() => (
<DayPickerRangeControllerWrapper
onOutsideClick={action('DayPickerRangeController::onOutsideClick')}
......@@ -328,6 +339,15 @@ storiesOf('DayPickerRangeController', module)
isDayBlocked={day => moment.weekdays(day.weekday()) === 'Friday'}
/>
)))
.add('with navigation blocked (minDate and maxDate)', withInfo()(() => (
<DayPickerRangeControllerWrapper
minDate={moment('2018-07-01')}
maxDate={moment('2018-10-20')}
onOutsideClick={action('DayPickerRangeController::onOutsideClick')}
onPrevMonthClick={action('DayPickerRangeController::onPrevMonthClick')}
onNextMonthClick={action('DayPickerRangeController::onNextMonthClick')}
/>
)))
.add('with custom daily details', withInfo()(() => (
<DayPickerRangeControllerWrapper
onOutsideClick={action('DayPickerRangeController::onOutsideClick')}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment