Skip to content

Commit a91941c

Browse files
NemeZZiZZgabrieljablonski
authored andcommitted
changed classnames module with clsx
1 parent 143221a commit a91941c

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,6 @@
126126
},
127127
"dependencies": {
128128
"@floating-ui/dom": "^1.6.1",
129-
"classnames": "^2.3.0"
129+
"clsx": "^2.0.0"
130130
}
131131
}

rollup.config.dev.js

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState, useRef, useCallback, useImperativeHandle } from 'react'
22
import { autoUpdate } from '@floating-ui/dom'
3-
import classNames from 'classnames'
3+
import clsx from 'clsx'
44
import {
55
debounce,
66
deepEqual,
@@ -847,7 +847,7 @@ const Tooltip = ({
847847
<WrapperElement
848848
id={id}
849849
role={role}
850-
className={classNames(
850+
className={clsx(
851851
'react-tooltip',
852852
coreStyles['tooltip'],
853853
styles['tooltip'],
@@ -877,7 +877,7 @@ const Tooltip = ({
877877
>
878878
{actualContent}
879879
<WrapperElement
880-
className={classNames(
880+
className={clsx(
881881
'react-tooltip-arrow',
882882
coreStyles['arrow'],
883883
styles['arrow'],

src/components/TooltipProvider/TooltipWrapper.tsx

Lines changed: 2 additions & 2 deletions
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,11 +2204,6 @@ cjs-module-lexer@^1.0.0:
22042204
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107"
22052205
integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==
22062206

2207-
classnames@^2.3.0:
2208-
version "2.3.2"
2209-
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
2210-
integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
2211-
22122207
clean-stack@^2.0.0:
22132208
version "2.2.0"
22142209
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -2267,6 +2262,11 @@ clone-regexp@^2.1.0:
22672262
dependencies:
22682263
is-regexp "^2.0.0"
22692264

2265+
clsx@^2.0.0:
2266+
version "2.0.0"
2267+
resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b"
2268+
integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==
2269+
22702270
co@^4.6.0:
22712271
version "4.6.0"
22722272
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"

0 commit comments

Comments
 (0)