Skip to content

Commit 125bd0b

Browse files
committed
changed classnames module with clsx
1 parent 01305c7 commit 125bd0b

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@
125125
},
126126
"dependencies": {
127127
"@floating-ui/dom": "^1.0.0",
128-
"classnames": "^2.3.0"
128+
"clsx": "^2.0.0"
129129
}
130130
}

rollup.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const name = 'ReactTooltip'
1818
const globals = {
1919
react: 'React',
2020
'react-dom': 'ReactDOM',
21-
classnames: 'classNames',
21+
clsx: 'clsx',
2222
'prop-types': 'PropTypes',
2323
}
2424

rollup.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const buildFormats = [
3939
'@floating-ui/dom': 'FloatingUIDOM',
4040
react: 'React',
4141
'react-dom': 'ReactDOM',
42-
classnames: 'classNames',
42+
clsx: 'clsx',
4343
'prop-types': 'PropTypes',
4444
},
4545
},

src/components/Tooltip/Tooltip.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState, useRef } from 'react'
2-
import classNames from 'classnames'
2+
import clsx from 'clsx'
33
import debounce from 'utils/debounce'
44
import { useTooltip } from 'components/TooltipProvider'
55
import useIsomorphicLayoutEffect from 'utils/use-isomorphic-layout-effect'
@@ -586,7 +586,7 @@ const Tooltip = ({
586586
<WrapperElement
587587
id={id}
588588
role="tooltip"
589-
className={classNames(
589+
className={clsx(
590590
'react-tooltip',
591591
coreStyles['tooltip'],
592592
styles['tooltip'],
@@ -608,7 +608,7 @@ const Tooltip = ({
608608
>
609609
{content}
610610
<WrapperElement
611-
className={classNames(
611+
className={clsx(
612612
'react-tooltip-arrow',
613613
coreStyles['arrow'],
614614
styles['arrow'],

src/components/TooltipProvider/TooltipWrapper.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useRef } from 'react'
2-
import classNames from 'classnames'
2+
import clsx from 'clsx'
33
import { useTooltip } from './TooltipProvider'
44
import type { ITooltipWrapper } from './TooltipProviderTypes'
55

@@ -35,7 +35,7 @@ const TooltipWrapper = ({
3535
return (
3636
<span
3737
ref={anchorRef}
38-
className={classNames('react-tooltip-wrapper', className)}
38+
className={clsx('react-tooltip-wrapper', className)}
3939
data-tooltip-place={place}
4040
data-tooltip-content={content}
4141
data-tooltip-html={html}

yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -2182,11 +2182,6 @@ cjs-module-lexer@^1.0.0:
21822182
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
21832183
integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==
21842184

2185-
classnames@^2.3.0:
2186-
version "2.3.2"
2187-
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
2188-
integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
2189-
21902185
clean-stack@^2.0.0:
21912186
version "2.2.0"
21922187
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -2245,6 +2240,11 @@ clone-regexp@^2.1.0:
22452240
dependencies:
22462241
is-regexp "^2.0.0"
22472242

2243+
clsx@^2.0.0:
2244+
version "2.0.0"
2245+
resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b"
2246+
integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==
2247+
22482248
co@^4.6.0:
22492249
version "4.6.0"
22502250
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"

0 commit comments

Comments
 (0)