diff --git a/.gitignore b/.gitignore
index f5c581e6..359f5895 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,6 @@ dist
# Webstorm cache
.idea
/webpack-stats.json
+
+# Mac crap
+.DS_Store
diff --git a/package.json b/package.json
index e5384126..2daeb90d 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,6 @@
],
"dependencies": {
"array.partial": "^1.0.5",
- "classnames": "^2.2.6",
"react-infinite-scroll-component": "^4.0.2"
},
"devDependencies": {
diff --git a/src/index.js b/src/index.js
index 65866816..be2c8979 100644
--- a/src/index.js
+++ b/src/index.js
@@ -6,7 +6,6 @@
* license MIT
* see https://github.com/dowjones/react-dropdown-tree-select
*/
-import cn from 'classnames/bind'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
@@ -17,11 +16,9 @@ import Tree from './tree'
import TreeManager from './tree-manager'
import keyboardNavigation from './tree-manager/keyboardNavigation'
-import styles from './index.css'
+import './index.css'
import { getAriaLabel } from './a11y'
-const cx = cn.bind(styles)
-
class DropdownTreeSelect extends Component {
static propTypes = {
data: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
@@ -286,17 +283,17 @@ class DropdownTreeSelect extends Component {
return (
{
this.node = node
}}
>
tags.map(tag => {
const { _id, label, tagClassName, dataset } = tag
return (
-
+
+
{getTags(tags, onTagRemove, readOnly, disabled, texts.labelRemove)}
- -
+
-
`${id}_tag`
@@ -44,11 +41,11 @@ class Tag extends PureComponent {
const tagId = getTagId(id)
const buttonId = `${id}_button`
- const className = cx('tag-remove', { readOnly }, { disabled })
+ const className = ['tag-remove', readOnly && 'readOnly', disabled && 'disabled'].filter(Boolean).join(' ')
const isDisabled = readOnly || disabled
return (
-
+
{label}