diff --git a/package.json b/package.json index 069ca289..3276810b 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,6 @@ }, "dependencies": { "@floating-ui/dom": "^1.0.0", - "classnames": "^2.3.0" + "clsx": "^2.0.0" } } diff --git a/rollup.config.dev.js b/rollup.config.dev.js index 2d9c0e6b..38a973db 100644 --- a/rollup.config.dev.js +++ b/rollup.config.dev.js @@ -18,7 +18,7 @@ const name = 'ReactTooltip' const globals = { react: 'React', 'react-dom': 'ReactDOM', - classnames: 'classNames', + clsx: 'clsx', 'prop-types': 'PropTypes', } diff --git a/rollup.config.prod.js b/rollup.config.prod.js index 7c29d6e8..1c63073d 100644 --- a/rollup.config.prod.js +++ b/rollup.config.prod.js @@ -39,7 +39,7 @@ const buildFormats = [ '@floating-ui/dom': 'FloatingUIDOM', react: 'React', 'react-dom': 'ReactDOM', - classnames: 'classNames', + clsx: 'clsx', 'prop-types': 'PropTypes', }, }, diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 3f3b8641..6a11195e 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState, useRef, useCallback, useImperativeHandle } from 'react' import { autoUpdate } from '@floating-ui/dom' -import classNames from 'classnames' +import clsx from 'clsx' import debounce from 'utils/debounce' import { useTooltip } from 'components/TooltipProvider' import useIsomorphicLayoutEffect from 'utils/use-isomorphic-layout-effect' @@ -790,7 +790,7 @@ const Tooltip = ({ {actualContent}