forked from gpbl/react-day-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPropTypes.js
More file actions
30 lines (27 loc) · 714 Bytes
/
Copy pathPropTypes.js
File metadata and controls
30 lines (27 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import PropTypes from 'prop-types';
const PrimitiveTypes = {
localeUtils: PropTypes.shape({
formatMonthTitle: PropTypes.func,
formatWeekdayShort: PropTypes.func,
formatWeekdayLong: PropTypes.func,
getFirstDayOfWeek: PropTypes.func,
}),
range: PropTypes.shape({
from: PropTypes.instanceOf(Date),
to: PropTypes.instanceOf(Date),
}),
after: PropTypes.shape({
after: PropTypes.instanceOf(Date),
}),
before: PropTypes.shape({
before: PropTypes.instanceOf(Date),
}),
};
export const ModifierPropType = PropTypes.oneOfType([
PrimitiveTypes.after,
PrimitiveTypes.before,
PrimitiveTypes.range,
PropTypes.func,
PropTypes.array,
]);
export default PrimitiveTypes;