mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-13 22:40:50 +08:00
Add renderMonthElement to react-dates (#27345)
This commit is contained in:
29
types/react-dates/index.d.ts
vendored
29
types/react-dates/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-dates v16.7.0
|
||||
// Type definitions for react-dates v17.1.0
|
||||
// Project: https://github.com/airbnb/react-dates
|
||||
// Definitions by: Artur Ampilogov <https://github.com/ArturAmpilogov>
|
||||
// Nathan Holland <https://github.com/NathanNZ>
|
||||
@@ -65,7 +65,14 @@ declare namespace ReactDates {
|
||||
keepFocusOnInput?: boolean,
|
||||
|
||||
// calendar presentation and interaction related props
|
||||
renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderMonthElement?: (
|
||||
props: {
|
||||
month: momentPropTypes.momentObj;
|
||||
onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void;
|
||||
onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void;
|
||||
}
|
||||
) => string | JSX.Element,
|
||||
orientation?: OrientationShape,
|
||||
anchorDirection?: AnchorDirectionShape,
|
||||
openDirection?: OpenDirectionShape,
|
||||
@@ -164,7 +171,14 @@ declare namespace ReactDates {
|
||||
keepFocusOnInput?: boolean,
|
||||
|
||||
// calendar presentation and interaction related props
|
||||
renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderMonthElement?: (
|
||||
props: {
|
||||
month: momentPropTypes.momentObj;
|
||||
onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void;
|
||||
onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void;
|
||||
}
|
||||
) => string | JSX.Element,
|
||||
orientation?: OrientationShape,
|
||||
anchorDirection?: AnchorDirectionShape,
|
||||
horizontalMargin?: number,
|
||||
@@ -386,7 +400,14 @@ declare namespace ReactDates {
|
||||
|
||||
// components/DayPickerShape.jsx
|
||||
interface DayPickerShape {
|
||||
renderMonth?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element),
|
||||
renderMonthElement?: (
|
||||
props: {
|
||||
month: momentPropTypes.momentObj;
|
||||
onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void;
|
||||
onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void;
|
||||
}
|
||||
) => string | JSX.Element,
|
||||
enableOutsideDays?: boolean,
|
||||
numberOfMonths?: number,
|
||||
orientation?: ScrollableOrientationShape,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"dt-header": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"file-name-casing": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
@@ -35,14 +36,15 @@
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
@@ -52,7 +54,6 @@
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
|
||||
Reference in New Issue
Block a user