Skip to content

Commit a37ca85

Browse files
committed
fix: Replace classnames with clsx
1 parent 312ed14 commit a37ca85

File tree

7 files changed

+13
-45
lines changed

7 files changed

+13
-45
lines changed

examples/src/components/ExampleItem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
22
import T from 'prop-types';
33
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; // eslint-disable-line
44
import { LiveProvider, LiveEditor, LivePreview, LiveError } from 'react-live';
5-
import classNames from 'classnames';
5+
import classNames from 'clsx';
66

77
const scope = { Tabs, Tab, TabList, TabPanel };
88

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"webpack-dev-server": "^3.1.7"
107107
},
108108
"dependencies": {
109-
"classnames": "^2.2.0",
109+
"clsx": "^1.1.0",
110110
"prop-types": "^15.5.0"
111111
},
112112
"jest": {

src/components/Tab.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React, { Component } from 'react';
3-
import cx from 'classnames';
3+
import cx from 'clsx';
44

55
const DEFAULT_CLASS = 'react-tabs__tab';
66

src/components/TabList.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React, { Component } from 'react';
3-
import cx from 'classnames';
3+
import cx from 'clsx';
44

55
export default class TabList extends Component {
66
static defaultProps = {

src/components/TabPanel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React, { Component } from 'react';
3-
import cx from 'classnames';
3+
import cx from 'clsx';
44

55
const DEFAULT_CLASS = 'react-tabs__tab-panel';
66

src/components/UncontrolledTabs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React, { cloneElement, Component } from 'react';
3-
import cx from 'classnames';
3+
import cx from 'clsx';
44
import uuid from '../helpers/uuid';
55
import { childrenPropType } from '../helpers/propTypes';
66
import { getPanelsCount, getTabsCount } from '../helpers/count';

yarn.lock

+7-39
Original file line numberDiff line numberDiff line change
@@ -2837,11 +2837,6 @@ class-utils@^0.3.5:
28372837
isobject "^3.0.0"
28382838
static-extend "^0.1.1"
28392839

2840-
classnames@^2.2.0:
2841-
version "2.2.6"
2842-
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
2843-
integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==
2844-
28452840
clean-css@^4.2.3:
28462841
version "4.2.3"
28472842
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78"
@@ -2966,6 +2961,11 @@ clone@^2.1.2:
29662961
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
29672962
integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=
29682963

2964+
clsx@^1.1.0:
2965+
version "1.1.0"
2966+
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.0.tgz#62937c6adfea771247c34b54d320fb99624f5702"
2967+
integrity sha512-3avwM37fSK5oP6M5rQ9CNe99lwxhXDOeSWVPAOYF6OazUTgZCMb0yWlJpmdD74REy1gkEaFiub2ULv4fq9GUhA==
2968+
29692969
cmd-shim@^3.0.0, cmd-shim@^3.0.3:
29702970
version "3.0.3"
29712971
resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-3.0.3.tgz#2c35238d3df37d98ecdd7d5f6b8dc6b21cadc7cb"
@@ -3671,7 +3671,7 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
36713671
dependencies:
36723672
ms "^2.1.1"
36733673

3674-
debuglog@*, debuglog@^1.0.1:
3674+
debuglog@^1.0.1:
36753675
version "1.0.1"
36763676
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
36773677
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
@@ -5964,7 +5964,7 @@ import-local@^3.0.2:
59645964
pkg-dir "^4.2.0"
59655965
resolve-cwd "^3.0.0"
59665966

5967-
imurmurhash@*, imurmurhash@^0.1.4:
5967+
imurmurhash@^0.1.4:
59685968
version "0.1.4"
59695969
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
59705970
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
@@ -7505,11 +7505,6 @@ lockfile@^1.0.4:
75057505
dependencies:
75067506
signal-exit "^3.0.2"
75077507

7508-
lodash._baseindexof@*:
7509-
version "3.1.0"
7510-
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
7511-
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
7512-
75137508
lodash._baseuniq@~4.6.0:
75147509
version "4.6.0"
75157510
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
@@ -7518,33 +7513,11 @@ lodash._baseuniq@~4.6.0:
75187513
lodash._createset "~4.0.0"
75197514
lodash._root "~3.0.0"
75207515

7521-
lodash._bindcallback@*:
7522-
version "3.0.1"
7523-
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
7524-
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
7525-
7526-
lodash._cacheindexof@*:
7527-
version "3.0.2"
7528-
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
7529-
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
7530-
7531-
lodash._createcache@*:
7532-
version "3.1.2"
7533-
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
7534-
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
7535-
dependencies:
7536-
lodash._getnative "^3.0.0"
7537-
75387516
lodash._createset@~4.0.0:
75397517
version "4.0.3"
75407518
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
75417519
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
75427520

7543-
lodash._getnative@*, lodash._getnative@^3.0.0:
7544-
version "3.9.1"
7545-
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
7546-
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
7547-
75487521
lodash._reinterpolate@^3.0.0:
75497522
version "3.0.0"
75507523
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
@@ -7605,11 +7578,6 @@ lodash.merge@^4.0.2:
76057578
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
76067579
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
76077580

7608-
lodash.restparam@*:
7609-
version "3.6.1"
7610-
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
7611-
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
7612-
76137581
lodash.sortby@^4.7.0:
76147582
version "4.7.0"
76157583
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"

0 commit comments

Comments
 (0)