From dc92a79ba2bd1ec07ec4fbe630665168a86fe0e2 Mon Sep 17 00:00:00 2001 From: Arkadii Shvartsman Date: Tue, 17 Oct 2023 11:36:06 +0200 Subject: [PATCH] fix default props https://github.com/Hacker0x01/react-datepicker/issues/4316 --- src/calendar_icon.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/calendar_icon.jsx b/src/calendar_icon.jsx index 01f21dd0e..20961ce27 100644 --- a/src/calendar_icon.jsx +++ b/src/calendar_icon.jsx @@ -1,7 +1,7 @@ import React from "react"; import PropTypes from "prop-types"; -const CalendarIcon = ({ icon, className }) => { +const CalendarIcon = ({ icon, className = "" }) => { const defaultClass = "react-datepicker__calendar-icon"; if (React.isValidElement(icon)) { @@ -36,8 +36,4 @@ CalendarIcon.propTypes = { className: PropTypes.string, }; -CalendarIcon.defaultProps = { - className: "", -}; - export default CalendarIcon;