Skip to content

Commit

Permalink
Use clsx (like Material-UI v4) instead of classnames for smaller builds
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Jun 21, 2019
1 parent a762350 commit 9b28005
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": ">=16.8.1"
},
"dependencies": {
"classnames": "^2.2.6",
"clsx": "^1.0.4",
"deepmerge": "^3.3.0",
"prop-types": "^15.7.2"
},
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, useState } from 'react';
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import clsx from 'clsx';

import { makeStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
Expand Down Expand Up @@ -109,7 +109,7 @@ function MuiTable(props) {
isCellSelected &&
isCellSelected({ column, rowData: {} });

const className = classNames({
const className = clsx({
[classes.cellHovered]: isHovered,
[classes.cellSelected]: isSelected
});
Expand Down Expand Up @@ -230,7 +230,7 @@ function MuiTable(props) {
const isSelected =
isCellSelected && isCellSelected({ column, rowData });

const className = classNames({
const className = clsx({
[classes.cellHovered]: isHovered,
[classes.cellSelected]: isSelected
});
Expand Down

0 comments on commit 9b28005

Please sign in to comment.