Skip to content

Commit

Permalink
Merge pull request #4324 from dygy/main
Browse files Browse the repository at this point in the history
fix default props
  • Loading branch information
martijnrusschen authored Oct 17, 2023
2 parents 892586b + dc92a79 commit 71a7068
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/calendar_icon.jsx
Original file line number Diff line number Diff line change
@@ -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 71a7068

Please sign in to comment.