diff --git a/src/week.jsx b/src/week.jsx
index 37206df4f..7239930ef 100644
--- a/src/week.jsx
+++ b/src/week.jsx
@@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import Day from "./day";
import WeekNumber from "./week_number";
-import classnames from "classnames";
+import { clsx } from "clsx";
import { addDays, getWeek, getStartOfWeek, isSameDay } from "./date_utils";
@@ -214,8 +214,6 @@ export default class Week extends React.Component {
),
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected(),
};
- return (
-
{this.renderDays()}
- );
+ return
{this.renderDays()}
;
}
}
diff --git a/src/week_number.jsx b/src/week_number.jsx
index 2dc0c5af0..ba02bedf6 100644
--- a/src/week_number.jsx
+++ b/src/week_number.jsx
@@ -1,6 +1,6 @@
import React from "react";
import PropTypes from "prop-types";
-import classnames from "classnames";
+import { clsx } from "clsx";
import { isSameDay } from "./date_utils";
export default class WeekNumber extends React.Component {
@@ -124,7 +124,7 @@ export default class WeekNumber extends React.Component {
return (
{
const { selectingDate, selectsStart, selectsEnd, selectsRange } =
this.props;
- return classnames("react-datepicker__year", {
+ return clsx("react-datepicker__year", {
"react-datepicker__year--selecting-range":
selectingDate && (selectsStart || selectsEnd || selectsRange),
});
diff --git a/src/year_dropdown_options.jsx b/src/year_dropdown_options.jsx
index ad9317048..ddaee88e8 100644
--- a/src/year_dropdown_options.jsx
+++ b/src/year_dropdown_options.jsx
@@ -1,6 +1,6 @@
import React, { createRef } from "react";
import PropTypes from "prop-types";
-import classNames from "classnames";
+import { clsx } from "clsx";
import { getYear } from "./date_utils";
function generateYears(year, noOfYear, minDate, maxDate) {
@@ -151,7 +151,7 @@ export default class YearDropdownOptions extends React.Component {
};
render() {
- let dropdownClass = classNames({
+ let dropdownClass = clsx({
"react-datepicker__year-dropdown": true,
"react-datepicker__year-dropdown--scrollable":
this.props.scrollableYearDropdown,
diff --git a/test/test_wrapper.jsx b/test/test_wrapper.jsx
index b50c7558b..780baaa49 100644
--- a/test/test_wrapper.jsx
+++ b/test/test_wrapper.jsx
@@ -1,9 +1,9 @@
import React from "react";
import PropTypes from "prop-types";
-import classNames from "classnames";
+import { clsx } from "clsx";
const TestWrapper = ({ className, children }) => (
-
{children}
+
{children}
);
TestWrapper.propTypes = {
diff --git a/yarn.lock b/yarn.lock
index 3a961907f..25af14264 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2623,11 +2623,6 @@ cjs-module-lexer@^1.0.0:
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107"
integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==
-classnames@^2.2.6:
- version "2.5.1"
- resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b"
- integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==
-
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -2662,6 +2657,11 @@ cliui@^8.0.1:
strip-ansi "^6.0.1"
wrap-ansi "^7.0.0"
+clsx@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.0.tgz#e851283bcb5c80ee7608db18487433f7b23f77cb"
+ integrity sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==
+
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"