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:
1 parent
043e31a472
commit
ab1537dab4
1 file changed
+3
-2
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user