Skip to content

Commit

Permalink
fix default props #4316
Browse files Browse the repository at this point in the history
  • Loading branch information
dygy committed Oct 17, 2023
1 parent 892586b commit dc92a79
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions 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)) {
Expand Down Expand Up @@ -36,8 +36,4 @@ CalendarIcon.propTypes = {
className: PropTypes.string,
};

CalendarIcon.defaultProps = {
className: "",
};

export default CalendarIcon;

0 comments on commit dc92a79

Please sign in to comment.