🤖 Merge PR #46111 [@types/react-dates] two new fields to existing shapes by @njlg

Co-authored-by: Nathan Levin-Greenhaw <nlevin-greenhaw@cmdtymkt.com>
This commit is contained in:
Nathan Levin-Greenhaw 2020-07-28 20:58:08 -07:00 committed by GitHub
parent 6615068204
commit b27845dbea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -26,6 +26,9 @@ declare namespace ReactDates {
// shapes/CalendarInfoPositionShape.js
type CalendarInfoPositionShape = 'top' | 'bottom' | 'before' | 'after';
// shapes/NavPositionShape.js
type NavPositionShape = 'navPositionTop' | 'navPositionBottom';
// shapes/DateRangePickerShape.js
interface DateRangePickerShape {
// required props for a functional interactive DateRangePicker
@ -102,6 +105,8 @@ declare namespace ReactDates {
verticalSpacing?: number;
// navigation related props
dayPickerNavigationInlineStyles?: Record<string, any>;
navPosition?: NavPositionShape;
navPrev?: string | JSX.Element;
navNext?: string | JSX.Element;
onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void;
@ -209,6 +214,8 @@ declare namespace ReactDates {
horizontalMonthPadding?: number;
// navigation related props
dayPickerNavigationInlineStyles?: Record<string, any>;
navPosition?: NavPositionShape;
navPrev?: string | JSX.Element;
navNext?: string | JSX.Element;
onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void;

View File

@ -67,6 +67,8 @@ class SingleDatePickerFullTest extends React.Component {
verticalHeight={5}
regular={true}
small={true}
navPosition="navPositionTop"
dayPickerNavigationInlineStyles={{width: '10'}}
/>
}
}
@ -125,6 +127,8 @@ class DateRangePickerFullTest extends React.Component {
monthFormat="MM"
renderDayContents={day => day.toString()}
onClose={(final:any) =>{}}
navPosition="navPositionTop"
dayPickerNavigationInlineStyles={{width: '10'}}
/>
}
}