Use classNames instead of ternary

Use the classNames feature to include/exclude a class based on a boolean instead of ternary operator
This commit is contained in:
Chris Garrity committed 2019-07-31 12:05:16 -04:00
1 parent 043e31a472
commit ab1537dab4
1 file changed
+3 -2
+3 -2
View File
@@ -107,8 +107,9 @@ class LibraryItemComponent extends React.PureComponent {
) : (
<Box
className={classNames(
styles.libraryItem,
this.props.hidden ? styles.hidden : null
styles.libraryItem, {
[styles.hidden]: this.props.hidden
}
)}
role="button"
tabIndex="0"