Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
readOnly: PropTypes.bool,
screenReaderInputMessage: PropTypes.string,
showClearDates: PropTypes.bool,
showDefaultInputIcon: PropTypes.bool,
inputIconPosition: IconPositionShape,
customInputIcon: PropTypes.node,
customArrowIcon: PropTypes.node,
customCloseIcon: PropTypes.node,
noBorder: PropTypes.bool,
block: PropTypes.bool,
small: PropTypes.bool,
regular: PropTypes.bool,
keepFocusOnInput: PropTypes.bool,
// calendar presentation and interaction related props
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderWeekHeaderElement: PropTypes.func,
orientation: OrientationShape,
anchorDirection: anchorDirectionShape,
openDirection: openDirectionShape,
horizontalMargin: PropTypes.number,
withPortal: PropTypes.bool,
withFullScreenPortal: PropTypes.bool,
appendToBody: PropTypes.bool,
disableScroll: PropTypes.bool,
daySize: nonNegativeInteger,
isRTL: PropTypes.bool,
firstDayOfWeek: DayOfWeekShape,
initialVisibleMonth: PropTypes.func,
numberOfMonths: PropTypes.number,
keepOpenOnDateSelect: PropTypes.bool,
month: momentPropTypes.momentObj,
horizontalMonthPadding: nonNegativeInteger,
isVisible: PropTypes.bool,
enableOutsideDays: PropTypes.bool,
modifiers: PropTypes.objectOf(ModifiersShape),
orientation: ScrollableOrientationShape,
daySize: nonNegativeInteger,
onDayClick: PropTypes.func,
onDayMouseEnter: PropTypes.func,
onDayMouseLeave: PropTypes.func,
onMonthSelect: PropTypes.func,
onYearSelect: PropTypes.func,
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderCalendarDay: PropTypes.func,
renderDayContents: PropTypes.func,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
firstDayOfWeek: DayOfWeekShape,
setMonthTitleHeight: PropTypes.func,
verticalBorderSpacing: nonNegativeInteger,
focusedDate: momentPropTypes.momentObj, // indicates focusable day
isFocused: PropTypes.bool, // indicates whether or not to move focus to focusable day
// i18n
monthFormat: PropTypes.string,
phrases: PropTypes.shape(getPhrasePropTypes(CalendarDayPhrases)),
dayAriaLabelFormat: PropTypes.string,
});
const defaultProps = {
month: moment(),
horizontalMonthPadding: 13,
initialMonth: momentPropTypes.momentObj,
isAnimating: PropTypes.bool,
numberOfMonths: PropTypes.number,
modifiers: PropTypes.objectOf(PropTypes.objectOf(ModifiersShape)),
orientation: ScrollableOrientationShape,
onDayClick: PropTypes.func,
onDayMouseEnter: PropTypes.func,
onDayMouseLeave: PropTypes.func,
onMonthTransitionEnd: PropTypes.func,
onMonthChange: PropTypes.func,
onYearChange: PropTypes.func,
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderCalendarDay: PropTypes.func,
renderDayContents: PropTypes.func,
translationValue: PropTypes.number,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
daySize: nonNegativeInteger,
focusedDate: momentPropTypes.momentObj, // indicates focusable day
isFocused: PropTypes.bool, // indicates whether or not to move focus to focusable day
firstDayOfWeek: DayOfWeekShape,
setMonthTitleHeight: PropTypes.func,
isRTL: PropTypes.bool,
transitionDuration: nonNegativeInteger,
verticalBorderSpacing: nonNegativeInteger,
// i18n
monthFormat: PropTypes.string,
phrases: PropTypes.shape(getPhrasePropTypes(CalendarDayPhrases)),
dayAriaLabelFormat: PropTypes.string,
});
const defaultProps = {
id: PropTypes.string.isRequired,
enableOutsideDays: PropTypes.bool,
firstVisibleMonthIndex: PropTypes.number,
horizontalMonthPadding: nonNegativeInteger,
initialMonth: momentPropTypes.momentObj,
isAnimating: PropTypes.bool,
numberOfMonths: PropTypes.number,
modifiers: PropTypes.objectOf(PropTypes.objectOf(ModifiersShape)),
orientation: ScrollableOrientationShape,
onDayClick: PropTypes.func,
onDayMouseEnter: PropTypes.func,
onDayMouseLeave: PropTypes.func,
onMonthTransitionEnd: PropTypes.func,
onMonthChange: PropTypes.func,
onYearChange: PropTypes.func,
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderCalendarDay: PropTypes.func,
renderDayContents: PropTypes.func,
translationValue: PropTypes.number,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
daySize: nonNegativeInteger,
focusedDate: momentPropTypes.momentObj, // indicates focusable day
isFocused: PropTypes.bool, // indicates whether or not to move focus to focusable day
firstDayOfWeek: DayOfWeekShape,
setMonthTitleHeight: PropTypes.func,
isRTL: PropTypes.bool,
transitionDuration: nonNegativeInteger,
verticalBorderSpacing: nonNegativeInteger,
// i18n
monthFormat: PropTypes.string,
phrases: PropTypes.shape(getPhrasePropTypes(CalendarDayPhrases)),
maxDate: momentPropTypes.momentObj,
focusedInput: FocusedInputShape,
onFocusChange: PropTypes.func,
onClose: PropTypes.func,
keepOpenOnDateSelect: PropTypes.bool,
minimumNights: PropTypes.number,
disabled: DisabledShape,
isOutsideRange: PropTypes.func,
isDayBlocked: PropTypes.func,
isDayHighlighted: PropTypes.func,
getMinNightsForHoverDate: PropTypes.func,
// DayPicker props
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderWeekHeaderElement: PropTypes.func,
enableOutsideDays: PropTypes.bool,
numberOfMonths: PropTypes.number,
orientation: ScrollableOrientationShape,
withPortal: PropTypes.bool,
initialVisibleMonth: PropTypes.func,
hideKeyboardShortcutsPanel: PropTypes.bool,
daySize: nonNegativeInteger,
noBorder: PropTypes.bool,
verticalBorderSpacing: nonNegativeInteger,
horizontalMonthPadding: nonNegativeInteger,
dayPickerNavigationInlineStyles: PropTypes.object,
navPosition: NavPositionShape,
navPrev: PropTypes.node,
// @ts-ignore
size={size}
viewBox={`0 0 ${viewBoxWidth} ${viewBoxHeight}`}
{...props}
>
{a11yLabel && <title>{a11yLabel}</title>}
{paths.map((path: string) => (
const propTypes = forbidExtraProps({
date: momentPropTypes.momentObj,
onDateChange: PropTypes.func,
focused: PropTypes.bool,
onFocusChange: PropTypes.func,
onClose: PropTypes.func,
keepOpenOnDateSelect: PropTypes.bool,
isOutsideRange: PropTypes.func,
isDayBlocked: PropTypes.func,
isDayHighlighted: PropTypes.func,
// DayPicker props
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderWeekHeaderElement: PropTypes.func,
enableOutsideDays: PropTypes.bool,
numberOfMonths: PropTypes.number,
orientation: ScrollableOrientationShape,
withPortal: PropTypes.bool,
initialVisibleMonth: PropTypes.func,
firstDayOfWeek: DayOfWeekShape,
hideKeyboardShortcutsPanel: PropTypes.bool,
daySize: nonNegativeInteger,
verticalHeight: nonNegativeInteger,
noBorder: PropTypes.bool,
verticalBorderSpacing: nonNegativeInteger,
transitionDuration: nonNegativeInteger,
horizontalMonthPadding: nonNegativeInteger,
readOnly: PropTypes.bool,
screenReaderInputMessage: PropTypes.string,
showClearDate: PropTypes.bool,
customCloseIcon: PropTypes.node,
showDefaultInputIcon: PropTypes.bool,
inputIconPosition: IconPositionShape,
customInputIcon: PropTypes.node,
noBorder: PropTypes.bool,
block: PropTypes.bool,
small: PropTypes.bool,
regular: PropTypes.bool,
verticalSpacing: nonNegativeInteger,
keepFocusOnInput: PropTypes.bool,
// calendar presentation and interaction related props
renderMonthText: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'),
renderWeekHeaderElement: PropTypes.func,
orientation: OrientationShape,
anchorDirection: anchorDirectionShape,
openDirection: openDirectionShape,
horizontalMargin: PropTypes.number,
withPortal: PropTypes.bool,
withFullScreenPortal: PropTypes.bool,
appendToBody: PropTypes.bool,
disableScroll: PropTypes.bool,
initialVisibleMonth: PropTypes.func,
firstDayOfWeek: DayOfWeekShape,
numberOfMonths: PropTypes.number,
keepOpenOnDateSelect: PropTypes.bool,
reopenPickerOnClearDate: PropTypes.bool,
renderCalendarInfo: PropTypes.func,
'topImageSrc',
);
const afterPropType = mutuallyExclusiveProps(
PropTypes.oneOfType([PropTypes.node, imageUrlTypePropType]),
'after',
'afterImageSrc',
);
const beforePropType = mutuallyExclusiveProps(
PropTypes.oneOfType([PropTypes.node, imageUrlTypePropType]),
'before',
'beforeImageSrc',
);
const imageSizePropType = mutuallyExclusiveProps(PropTypes.bool, 'small', 'large');
CardContent.propTypes = {
after: afterPropType,
afterImageSrc: imageUrlTypePropType,
before: beforePropType,
beforeImageSrc: imageUrlTypePropType,
large: imageSizePropType,
small: imageSizePropType,
topImageSrc: imageUrlTypePropType,
};
export default CardContent;
>
{children}
);
}
const imageUrlTypePropType = mutuallyExclusiveProps(
PropTypes.string,
'beforeImageSrc',
'afterImageSrc',
'topImageSrc',
);
const afterPropType = mutuallyExclusiveProps(
PropTypes.oneOfType([PropTypes.node, imageUrlTypePropType]),
'after',
'afterImageSrc',
);
const beforePropType = mutuallyExclusiveProps(
PropTypes.oneOfType([PropTypes.node, imageUrlTypePropType]),
'before',
'beforeImageSrc',
);
const imageSizePropType = mutuallyExclusiveProps(PropTypes.bool, 'small', 'large');
CardContent.propTypes = {
after: afterPropType,
afterImageSrc: imageUrlTypePropType,